public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] [SCSI] libfc: unlocking wrong lock in fc_eh_abort()
@ 2010-11-18  4:18 Dan Carpenter
  2010-11-18 19:02 ` Robert Love
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-11-18  4:18 UTC (permalink / raw)
  To: Robert Love, Vasu Dev
  Cc: James E.J. Bottomley, devel, linux-scsi, kernel-janitors

In commit 8b7ac2bb07bb "[SCSI] libfc: possible race could panic system
due to NULL fsp->cmd" we changed the lock which was used in this
function, but this path was missed.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This is a static checker fix.  Compile tested only.

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 2924363..b9ad74d 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)
 	fsp = CMD_SP(sc_cmd);
 	if (!fsp) {
 		/* command completed while scsi eh was setting up */
-		spin_unlock_irqrestore(lport->host->host_lock, flags);
+		spin_unlock_irqrestore(&si->scsi_queue_lock, flags);
 		return SUCCESS;
 	}
 	/* grab a ref so the fsp and sc_cmd cannot be relased from under us */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-18 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18  4:18 [patch] [SCSI] libfc: unlocking wrong lock in fc_eh_abort() Dan Carpenter
2010-11-18 19:02 ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox