]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SCSI] Make scsi_free_queue() kill pending SCSI commands
authorBart Van Assche <bvanassche@acm.org>
Fri, 23 Sep 2011 17:48:18 +0000 (19:48 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:50 +0000 (15:35 -0400)
commit649de82fef23a2b5ad04b7765c872f35651358a9
tree384ddc0b205a402ee976248e25127b19eaae05c1
parent97547b895b4485f7097ceefbbfd42806c8c03496
[SCSI] Make scsi_free_queue() kill pending SCSI commands

commit 3308511c93e6ad0d3c58984ecd6e5e57f96b12c8 upstream.

Make sure that SCSI device removal via scsi_remove_host() does finish
all pending SCSI commands. Currently that's not the case and hence
removal of a SCSI host during I/O can cause a deadlock. See also
"blkdev_issue_discard() hangs forever if underlying storage device is
removed" (http://bugzilla.kernel.org/show_bug.cgi?id=40472). See also
http://lkml.org/lkml/2011/8/27/6.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/scsi/hosts.c
drivers/scsi/scsi_lib.c