linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: Joseph Gruher <joseph.r.gruher@intel.com>,
	Mike Snitzer <snitzer@redhat.com>,
	Ilgu Hong <ilgu.hong@promise.com>,
	linux-scsi@vger.kernel.org, stable@kernel.org
Subject: [PATCH 2/5] [SCSI] scsi_dh_alua: fix deadlock in stpg_endio
Date: Wed,  5 Jan 2011 16:00:21 -0500	[thread overview]
Message-ID: <1294261224-12599-3-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1294261224-12599-1-git-send-email-snitzer@redhat.com>

From: Joseph Gruher <joseph.r.gruher@intel.com>

The use of blk_execute_rq_nowait() implies __blk_put_request() is needed
in stpg_endio() rather than blk_put_request() -- blk_finish_request() is
called with queue lock already held.

Signed-off-by: Joseph Gruher <joseph.r.gruher@intel.com>
Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
---
 drivers/scsi/device_handler/scsi_dh_alua.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index afb1d05..ba3c649 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -285,7 +285,8 @@ static void stpg_endio(struct request *req, int error)
 			    print_alua_state(h->state));
 	}
 done:
-	blk_put_request(req);
+	req->end_io_data = NULL;
+	__blk_put_request(req->q, req);
 	if (h->callback_fn) {
 		h->callback_fn(h->callback_data, err);
 		h->callback_fn = h->callback_data = NULL;
-- 
1.7.3.4

  parent reply	other threads:[~2011-01-05 21:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 21:00 [PATCH 0/5] [SCSI] scsi_dh_alua: fixes and new dev support Mike Snitzer
2011-01-05 21:00 ` [PATCH 1/5] [SCSI] scsi_dh_alua: fix submit_stpg return Mike Snitzer
2011-01-05 21:00 ` Mike Snitzer [this message]
2011-01-05 21:00 ` [PATCH 3/5] [SCSI] scsi_dh_alua: fix stpg_endio group state reporting Mike Snitzer
2011-01-05 21:00 ` [PATCH 4/5] [SCSI] scsi_dh_alua: Add Promise VTrak to dev list Mike Snitzer
2011-01-05 21:00 ` [PATCH 5/5] [SCSI] scsi_dh_alua: add scalable ONTAP lun " Mike Snitzer
2011-01-05 21:15 ` [PATCH 0/5] [SCSI] scsi_dh_alua: fixes and new dev support Mike Snitzer
2011-01-06  0:37 ` Nicholas A. Bellinger

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=1294261224-12599-3-git-send-email-snitzer@redhat.com \
    --to=snitzer@redhat.com \
    --cc=James.Bottomley@suse.de \
    --cc=ilgu.hong@promise.com \
    --cc=joseph.r.gruher@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stable@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).