[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [patch 4/6] xenbus: suspend correctly
Hi, Cleanup correctly on suspend, unregister watches. Again needed for domU kexec, so the next kernel instance can register watches without running into -EBUSY. cheers, Gerd -- Gerd Hoffmann <kraxel@xxxxxxx> http://www.suse.de/~kraxel/julika-dora.jpeg Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxx> Index: source-lnx-stable-22813/drivers/xen/xenbus/xenbus_xs.c =================================================================== --- source-lnx-stable-22813.orig/drivers/xen/xenbus/xenbus_xs.c 2006-08-17 15:19:20.000000000 +0200 +++ source-lnx-stable-22813/drivers/xen/xenbus/xenbus_xs.c 2006-08-17 15:20:17.000000000 +0200 @@ -665,7 +665,17 @@ EXPORT_SYMBOL_GPL(unregister_xenbus_watc void xs_suspend(void) { + struct xenbus_watch *watch; + char token[sizeof(watch) * 2 + 1]; + down_write(&xs_state.suspend_mutex); + + /* No need for watches_lock: the suspend_mutex is sufficient. */ + list_for_each_entry(watch, &watches, list) { + sprintf(token, "%lX", (long)watch); + xs_unwatch(watch->node, token); + } + mutex_lock(&xs_state.request_mutex); } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |