From: Joseph Gruher Date: Wed, 5 Jan 2011 21:00:21 +0000 (-0500) Subject: scsi_dh_alua: fix deadlock in stpg_endio X-Git-Tag: v2.6.38.1~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0b67526b4e76946e2b2e2da4cf8175ad78ae2879;p=karo-tx-linux.git 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 Signed-off-by: Ilgu Hong Signed-off-by: Mike Snitzer Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 6b729324b8d3..30f2b333ccbd 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;