diff options
author | Robert Love <robert.w.love@intel.com> | 2010-11-30 19:18:23 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:24:20 -0500 |
commit | 3c2c3bf23cbef8eed6cf815715d0bece5cb7b5ec (patch) | |
tree | 3cca737e6945e452aeb8888c3aa36939d76aa338 /drivers/scsi/libfc | |
parent | 2034c19ce8f8503aa14cb1e763fbfe60316aaa8e (diff) |
[SCSI] libfc: Fix incorrect locking and unlocking in FCP
The error handler grabs the si->scsi_queue_lock, but
in the case where the fsp pointer is NULL it releases
the scsi_host lock. This can lead to a variety of
system hangs depending on which is used first- the
scsi_host lock or the scsi_queue_lock.
This patch simply unlocks the correct lock when fcp
is NULL.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 2924363d142b..b9ad74de76da 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -2004,7 +2004,7 @@ int fc_eh_abort(struct scsi_cmnd *sc_cmd) | |||
2004 | fsp = CMD_SP(sc_cmd); | 2004 | fsp = CMD_SP(sc_cmd); |
2005 | if (!fsp) { | 2005 | if (!fsp) { |
2006 | /* command completed while scsi eh was setting up */ | 2006 | /* command completed while scsi eh was setting up */ |
2007 | spin_unlock_irqrestore(lport->host->host_lock, flags); | 2007 | spin_unlock_irqrestore(&si->scsi_queue_lock, flags); |
2008 | return SUCCESS; | 2008 | return SUCCESS; |
2009 | } | 2009 | } |
2010 | /* grab a ref so the fsp and sc_cmd cannot be relased from under us */ | 2010 | /* grab a ref so the fsp and sc_cmd cannot be relased from under us */ |