linux-kernel-test/drivers/base
Alan Stern ef2c51746d Driver core: fix race in __device_release_driver
This patch (as1013) was suggested by David Woodhouse; it fixes a race
in the driver core.  If a device is unregistered at the same time as
its driver is unloaded, the driver's code pages may be unmapped while
the remove method is still running.  The calls to get_driver() and
put_driver() were intended to prevent this, but they don't work if the
driver's module count has already dropped to 0.

Instead, the patch keeps the device on the driver's list until after
the remove method has returned.  This forces the necessary
synchronization to occur.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:35 -08:00
..
power driver core: clean up device_shutdown 2008-01-24 20:40:25 -08:00
attribute_container.c Driver core: include linux/mutex.h from attribute_container.c 2007-07-11 16:09:01 -07:00
base.h Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
bus.c Kobject: change drivers/base/bus to use kobject_init_and_add 2008-01-24 20:40:35 -08:00
class.c Kobject: convert drivers/base/class.c to use kobject_init/add_ng() 2008-01-24 20:40:30 -08:00
core.c Driver core: clean up debugging messages 2008-01-24 20:40:35 -08:00
cpu.c CPU online file permission 2007-07-31 15:39:39 -07:00
dd.c Driver core: fix race in __device_release_driver 2008-01-24 20:40:35 -08:00
devres.c Driver core: fix devres_release_all() return value 2007-07-11 16:09:02 -07:00
dma-mapping.c devres: device resource management 2007-02-09 17:39:36 -05:00
dmapool.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
driver.c Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
firmware_class.c Fix Firmware class name collision 2007-10-12 14:51:06 -07:00
firmware.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
hypervisor.c kobject: convert /sys/hypervisor to use kobject_create 2008-01-24 20:40:15 -08:00
init.c [PATCH] Driver Core: Add /sys/hypervisor when needed 2006-06-21 12:40:48 -07:00
isa.c [PATCH] Driver model: add ISA bus 2006-06-21 12:40:49 -07:00
Kconfig Driver core: add CONFIG_UEVENT_HELPER_PATH 2007-10-12 14:51:01 -07:00
Makefile Driver core: move the driver specific module code into the driver core 2008-01-24 20:40:35 -08:00
map.c [PATCH] kobj_map semaphore to mutex conversion 2006-03-20 13:42:58 -08:00
memory.c memory hotplug: rearrange memory hotplug notifier 2007-10-22 08:13:17 -07:00
module.c Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
node.c mm: add node states sysfs class attributeS 2007-10-16 09:43:03 -07:00
platform.c Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
sys.c Kobject: change drivers/base/sys.c to use kobject_init_and_add 2008-01-24 20:40:28 -08:00
topology.c cpu hotplug: topology: remove topology_dev_map 2007-10-18 14:37:21 -07:00
transport_class.c