Skip to contentSkip to conversation

scsi_dh_hp_sw: fix deadlock in stpg_endio

PATCH Superseded Mike Snitzer 1 participant 1 message Jan 25, 2011 SCSI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_dh_hp_sw: fix deadlock in stpg_endio

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.

---
 drivers/scsi/device_handler/scsi_dh_hp_sw.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/scsi/device_handler/scsi_dh_hp_sw.c +2 -1
index e391664..d0363c8 100644
@@ -225,7 +225,8 @@ static void start_stop_endio(struct request *req, int error)
 		}
 	}
 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;