]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] libiscsi: grab eh_mutex during host reset
authorMike Christie <michaelc@cs.wisc.edu>
Thu, 13 Dec 2007 18:43:28 +0000 (12:43 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jan 2008 00:28:31 +0000 (18:28 -0600)
commit8d1404edb789f3282df46f134b05566ce58d63d4
tree98e3862e44333ef124becb957a0d0cd88ba24ed9
parent2641f08be9886087733904ae07941f16a7660f6f
[SCSI] libiscsi: grab eh_mutex during host reset

I thought we may not need the eh mutex during host reset, but that is wrong
with the new shutdown code. When start_session_recovery sets the state to
terminate then drops the session lock. The scsi eh thread could then grab the
session lock see that we are terminating and then return failed to scsi-ml.
scsi-ml's eh then owns the command and will do whatever it wants
with it. But then the iscsi eh thread could grab the session lock
and want to complete the scsi commands that we in the LLD, but
it no longer owns them and kaboom.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libiscsi.c