kernel-ark/block
James Bottomley bfe159a512 [SCSI] fix crash in scsi_dispatch_cmd()
USB surprise removal of sr is triggering an oops in
scsi_dispatch_command().  What seems to be happening is that USB is
hanging on to a queue reference until the last close of the upper
device, so the crash is caused by surprise remove of a mounted CD
followed by attempted unmount.

The problem is that USB doesn't issue its final commands as part of
the SCSI teardown path, but on last close when the block queue is long
gone.  The long term fix is probably to make sr do the teardown in the
same way as sd (so remove all the lower bits on ejection, but keep the
upper disk alive until last close of user space).  However, the
current oops can be simply fixed by not allowing any commands to be
sent to a dead queue.

Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-21 14:21:18 -07:00
..
blk-cgroup.c cgroups: add per-thread subsystem callbacks 2011-05-26 17:12:34 -07:00
blk-cgroup.h cfq-iosched: Make IO merge related stats per cpu 2011-05-23 10:02:19 +02:00
blk-core.c [SCSI] fix crash in scsi_dispatch_cmd() 2011-07-21 14:21:18 -07:00
blk-exec.c [SCSI] fix crash in scsi_dispatch_cmd() 2011-07-21 14:21:18 -07:00
blk-flush.c block: hold queue if flush is running for non-queueable flush drive 2011-05-06 11:36:25 -06:00
blk-integrity.c dm: improve block integrity support 2011-04-05 23:52:43 +02:00
blk-ioc.c block: Use hlist_entry() for io_context.cic_list.first 2011-06-02 13:05:02 +02:00
blk-iopoll.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
blk-lib.c blkdev: Do not return -EOPNOTSUPP if discard is supported 2011-05-06 19:30:01 -06:00
blk-map.c block: check for proper length of iov entries earlier in blk_rq_map_user_iov() 2010-11-29 10:04:50 +01:00
blk-merge.c block: attempt to merge with existing requests on plug flush 2011-03-21 10:14:27 +01:00
blk-settings.c block: Fix discard topology stacking and reporting 2011-05-18 10:37:35 +02:00
blk-softirq.c generic-ipi: remove CSD_FLAG_WAIT 2009-02-25 14:13:44 +01:00
blk-sysfs.c Merge commit 'v2.6.39' into for-2.6.40/core 2011-05-20 20:33:15 +02:00
blk-tag.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
blk-throttle.c block: Add __attribute__((format(printf...) and fix fallout 2011-06-13 10:42:49 +02:00
blk-timeout.c block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer 2010-04-21 17:42:08 +02:00
blk.h Merge branch 'for-linus' into for-2.6.40/core 2011-05-20 20:36:16 +02:00
bsg.c [SCSI] bsg: correct fault if queue object removed while dev_t open 2010-12-09 09:41:14 -06:00
cfq-iosched.c cfq-iosched: make code consistent 2011-06-27 09:36:06 +02:00
cfq.h blk-cgroup: Add unaccounted time to timeslice_used. 2011-03-12 16:54:00 +01:00
compat_ioctl.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
deadline-iosched.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
elevator.c block: get rid of on-stack plugging debug checks 2011-05-20 20:52:16 +02:00
genhd.c block: make disk_block_events() properly wait for work cancellation 2011-06-09 20:43:59 +02:00
ioctl.c block: fix refcounting in BLKBSZSET 2011-02-24 08:54:21 -08:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Kconfig.iosched blk-cgroup: config options re-arrangement 2010-04-26 19:27:56 +02:00
Makefile Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
noop-iosched.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
scsi_ioctl.c block: take care not to overflow when calculating total iov length 2010-11-10 14:40:42 +01:00