]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] Fix race between starved list and device removal
authorJames Bottomley <JBottomley@Parallels.com>
Tue, 2 Jul 2013 13:05:26 +0000 (15:05 +0200)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 9 Jul 2013 11:14:08 +0000 (12:14 +0100)
commitfa4947a28c102caea195f628bfd10141ca23effa
treea1ba31c44721a9a106967e16b6065d4b98c0abeb
parentbed8941f07d650f46648c4ba1d4f623e9eed4571
[SCSI] Fix race between starved list and device removal

scsi_run_queue() examines all SCSI devices that are present on
the starved list. Since scsi_run_queue() unlocks the SCSI host
lock a SCSI device can get removed after it has been removed
from the starved list and before its queue is run. Protect
against that race condition by holding a reference on the
queue while running it.

Reported-by: Chanho Min <chanho.min@lge.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_lib.c