linux/drivers
Alan Stern c95a6b057b [PATCH] driver core: Fix races in driver_detach()
This patch is intended for your "driver" tree.  It fixes several subtle
races in driver_detach() and device_release_driver() in the driver-model
core.

The major change is to use klist_remove() rather than klist_del() when
taking a device off its driver's list.  There's no other way to guarantee
that the list pointers will be updated before some other driver binds to
the device.  For this to work driver_detach() can't use a klist iterator,
so the loop over the devices must be written out in full.  In addition the
patch protects against the possibility that, when a driver and a device
are unregistered at the same time, one may be unloaded from memory before
the other is finished using it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20 15:15:28 -07:00
..
acorn
acpi [PATCH] sysfs: (rest) if show/store is missing return -EIO 2005-06-20 15:15:03 -07:00
atm
base [PATCH] driver core: Fix races in driver_detach() 2005-06-20 15:15:28 -07:00
block [PATCH] class: convert drivers/block/* to use the new class api instead of class_simple 2005-06-20 15:15:07 -07:00
bluetooth
cdrom
char [PATCH] Fix typo in scdrv_init() 2005-06-20 15:15:27 -07:00
cpufreq [PATCH] sysfs: (rest) if show/store is missing return -EIO 2005-06-20 15:15:03 -07:00
crypto
dio
eisa
fc4 [SCSI] allow sleeping in ->eh_host_reset_handler() 2005-06-17 12:05:18 -05:00
firmware [PATCH] sysfs: (rest) if show/store is missing return -EIO 2005-06-20 15:15:03 -07:00
i2c
ide
ieee1394 [PATCH] Use device_for_each_child() to unregister devices in nodemgr_remove_host_dev() 2005-06-20 15:15:26 -07:00
infiniband [PATCH] sysfs: (rest) if show/store is missing return -EIO 2005-06-20 15:15:03 -07:00
input [PATCH] INPUT: move to use the new class code, instead of class_simple 2005-06-20 15:15:04 -07:00
isdn [PATCH] class: convert drivers/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
macintosh [PATCH] class: convert drivers/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
mca
md [PATCH] dm: Handle READA requests in dm-mpath.c 2005-06-08 16:21:14 -07:00
media [PATCH] class: convert drivers/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
message merge by hand (fix up qla_os.c merge error) 2005-06-17 18:42:23 -05:00
misc
mmc
mtd
net [PATCH] class: convert drivers/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
nubus
oprofile
parisc
parport
pci [PATCH] use device_for_each_child() to properly access child devices. 2005-06-20 15:15:26 -07:00
pcmcia
pnp [PATCH] Use driver_for_each_device() in drivers/pnp/driver.c instead of manually walking list. 2005-06-20 15:15:13 -07:00
s390 [PATCH] class: convert drivers/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
sbus
scsi [PATCH] use device_for_each_child() to properly access child devices. 2005-06-20 15:15:22 -07:00
serial [PATCH] Serial: remove unused variable in sa1100 driver 2005-06-08 19:26:47 +01:00
sh
sn
tc
telephony
usb [PATCH] usb: klist_node_attached() fix 2005-06-20 15:15:28 -07:00
video [PATCH] class: convert drivers/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
w1
zorro
Kconfig
Makefile