]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
scsi_dh_alua: fix deadlock in stpg_endio
authorJoseph Gruher <joseph.r.gruher@intel.com>
Wed, 5 Jan 2011 21:00:21 +0000 (16:00 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Mar 2011 19:50:33 +0000 (12:50 -0700)
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>
drivers/scsi/device_handler/scsi_dh_alua.c

index 6b729324b8d37acbfa172c41dad906bdcfa5bffe..30f2b333ccbdb1a4409103bf9f7e6f8e5528f50d 100644 (file)
@@ -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;