]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
SCSI: bsg: fix bsg_mutex hang with device removal
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 31 Jul 2008 11:31:33 +0000 (13:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Aug 2008 16:03:11 +0000 (09:03 -0700)
commitc4ec1c369322fc6dd1512975e11d2d2abe90a705
tree987d1cd03dc1823a5d0439c92368cd204e4d1474
parent16ace6872d0191fdbd764102b46e175c95b67b66
SCSI: bsg: fix bsg_mutex hang with device removal

commit 3f27e3ed11e67c5ee19d560a50eafd93cf8c6682 upstream

[SCSI] bsg: fix bsg_mutex hang with device removal

We don't need to hold bsg_mutex during bsg_complete_all_commands(). It
leads to a problem that we block bsg_unregister_queue during
bsg_complete_all_commands (untill all the outstanding commands
complete).

Thanks to Pete Wyckoff for finding the bug and testing the patch.

The detailed bug report is:

http://marc.info/?l=linux-scsi&m=121182137132145&w=2

Tested-by: Pete Wyckoff <pw@osc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
CC: Oliver Pinter <oliver.pntr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block/bsg.c