OpenCloudOS-Kernel/block
Russell King 56cf6504fc [BLOCK] Fix oops on removal of SD/MMC card
The block layer keeps a reference (driverfs_dev) to the struct
device associated with the block device, and uses it internally
for generating uevents in block_uevent.

Block device uevents include umounting the partition, which can
occur after the backing device has been removed.

Unfortunately, this reference is not counted.  This means that
if the struct device is removed from the device tree, the block
layers reference will become stale.

Guard against this by holding a reference to the struct device
in add_disk(), and only drop the reference when we're releasing
the gendisk kobject - in other words when we can be sure that no
further uevents will be generated for this block device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Jens Axboe <axboe@suse.de>
2006-05-05 17:57:52 +01:00
..
Kconfig [PATCH] config: fix CONFIG_LFS option 2006-03-31 12:18:55 -08:00
Kconfig.iosched [BLOCK] iosched: fix setting of default io scheduler 2005-11-04 08:44:58 +01:00
Makefile [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
as-iosched.c [PATCH 1/2] iosched: fix typo and barrier() 2006-04-18 09:44:06 +02:00
blktrace.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
cfq-iosched.c [PATCH] cfq: Further rbtree traversal and cfq_exit_queue() race fix 2006-04-18 19:18:31 +02:00
deadline-iosched.c [PATCH] fix rmmod problems with elevator attributes, clean them up 2006-03-18 22:27:18 -05:00
elevator.c [PATCH] block/elevator.c: remove unused exports 2006-04-20 15:45:22 +02:00
genhd.c [BLOCK] Fix oops on removal of SD/MMC card 2006-05-05 17:57:52 +01:00
ioctl.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
ll_rw_blk.c [PATCH] Remove __devinitdata from notifier block definitions 2006-04-26 08:27:50 -07:00
noop-iosched.c [BLOCK] noop-iosched: reimplementation of request dispatching 2005-11-12 10:56:52 +01:00
scsi_ioctl.c [SCSI] unify SCSI_IOCTL_SEND_COMMAND implementations 2006-04-13 10:13:15 -05:00