public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Robert Love <robert.w.love@intel.com>, Vasu Dev <vasu.dev@intel.com>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>,
	devel@open-fcoe.org, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch] [SCSI] libfc: unlocking wrong lock in fc_eh_abort()
Date: Thu, 18 Nov 2010 07:18:43 +0300	[thread overview]
Message-ID: <20101118041843.GN31724@bicker> (raw)

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 */

             reply	other threads:[~2010-11-18  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18  4:18 Dan Carpenter [this message]
2010-11-18 19:02 ` [patch] [SCSI] libfc: unlocking wrong lock in fc_eh_abort() Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101118041843.GN31724@bicker \
    --to=error27@gmail.com \
    --cc=James.Bottomley@suse.de \
    --cc=devel@open-fcoe.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robert.w.love@intel.com \
    --cc=vasu.dev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox