aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Gruher <joseph.r.gruher@intel.com>2011-01-05 16:00:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-23 12:50:33 -0700
commit07fdde9d76f51afd29b1bd3ec1f5a7b8f5b16400 (patch)
tree805bb680ad4429c9802afeb693bdc6883e270c77
parent91a9f6d49d6759dccacd83358dcb7dc30ac622c7 (diff)
scsi_dh_alua: fix deadlock in stpg_endio
commit ed0f36bc5719b25659b637f80ceea85494b84502 upstream. 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> Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c3
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 6b729324b8d..30f2b333ccb 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;