linux/drivers/xen
Olaf Hering c4c303c7c5 xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive
During repeated kexec boots xenwatch_thread() can crash because
xenbus_watch->callback is cleared by xenbus_watch_path() if a node/token
combo for a new watch happens to match an already registered watch from
an old kernel.  In this case xs_watch returns -EEXISTS, then
register_xenbus_watch() does not remove the to-be-registered watch from
the list of active watches but returns the -EEXISTS to the caller
anyway.

Because the watch is still active in xenstored it will cause an event
which will arrive in the new kernel. process_msg() will find the
encapsulated struct xenbus_watch in its list of registered watches and
puts the "empty" watch handle in the queue for xenwatch_thread().
xenwatch_thread() then calls ->callback which was cleared earlier by
xenbus_watch_path().

To prevent that crash in a guest running on an old xen toolstack remove
the special -EEXIST handling.

v2:
 - remove the EEXIST handing in register_xenbus_watch() instead of
   checking for ->callback in process_msg()

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
2011-09-01 11:48:29 -04:00
..
xenbus xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive 2011-09-01 11:48:29 -04:00
xenfs Merge branch 'xen/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2011-01-20 16:37:28 -08:00
balloon.c xen/balloon: Move dec_totalhigh_pages() from __balloon_append() to balloon_append() 2011-03-30 11:54:51 -04:00
biomerge.c xen: define BIOVEC_PHYS_MERGEABLE() 2010-10-18 10:40:28 -04:00
cpu_hotplug.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-11 12:18:16 -08:00
events.c xen: Fix compile warning when CONFIG_SMP is not defined. 2011-06-15 14:25:01 -04:00
evtchn.c treewide: remove extra semicolons 2011-04-10 17:01:05 +02:00
features.c
gntalloc.c xen/gntdev,gntalloc: Remove unneeded VM flags 2011-03-09 22:15:28 -05:00
gntdev.c Merge branches 'stable/backend.base.v3' and 'stable/gntalloc.v7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-05-19 16:14:25 -07:00
grant-table.c xen/p2m/m2p/gnttab: Support GNTMAP_host_map in the M2P override. 2011-04-18 11:10:27 -04:00
Kconfig xen: change xen/[gntdev/gntalloc] to default m 2011-02-16 09:30:02 -05:00
Makefile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem 2011-05-26 10:50:56 -07:00
manage.c PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
pci.c xen: register xen pci notifier 2010-10-27 18:56:07 +01:00
platform-pci.c xen: no need to delay xen_setup_shutdown_event for hvm guests anymore 2011-02-25 16:43:03 +00:00
swiotlb-xen.c Merge branch 'stable/xen-swiotlb.bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6 2011-06-09 12:52:44 -07:00
sys-hypervisor.c drivers/xen/sys-hypervisor: Cleanup code/data sections definitions 2011-05-19 11:30:41 -04:00
tmem.c xen: cleancache shim to Xen Transcendent Memory 2011-05-26 10:02:21 -06:00
xen-balloon.c xen-balloon: Move core balloon functionality out of module 2011-03-16 10:05:34 -04:00
xencomm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00