linux/drivers/xen/xenbus
Daniel Stodden 5b61cb90c2 xenbus: Make xenbus_switch_state transactional
According to the comments, this was how it's been done years ago, but
apparently took an xbt pointer from elsewhere back then. The code was
removed because of consistency issues: cancellation wont't roll back
the saved xbdev->state.

Still, unsolicited writes to the state field remain an issue,
especially if device shutdown takes thread synchronization, and subtle
races cause accidental recreation of the device node.

Fixed by reintroducing the transaction. An internal one is sufficient,
so the xbdev->state value remains consistent.

Also fixes the original hack to prevent infinite recursion. Instead of
bailing out on the first attempt to switch to Closing, checks call
depth now.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-08-07 18:31:34 +02:00
..
Makefile
xenbus_client.c xenbus: Make xenbus_switch_state transactional 2010-08-07 18:31:34 +02:00
xenbus_comms.c xenbus: rebind irq on restore 2008-05-27 10:11:38 +02:00
xenbus_comms.h
xenbus_probe.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
xenbus_probe.h xen: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:34 -08:00
xenbus_xs.c xen: avoid allocation causing potential swap activity on the resume path 2010-06-03 09:34:45 +01:00