kernel-janitors.vger.kernel.org archive mirror
 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

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

On Wed, 2010-11-17 at 20:18 -0800, Dan Carpenter wrote:
> 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>

Hi Dan,

   I found this bug too and have a patch in my tree.

Thanks, //Rob


^ permalink raw reply	[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;
as well as URLs for NNTP newsgroup(s).