Skip to contentSkip to conversation

ipr: fix addition of abort command to HRRQ free queue

PATCH Kleber Sacilotto de Souza 1 participant 1 message Mar 11, 2013 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Please ignore this one. Messed up with send-email --annotate.

Thanks,
Kleber

Quoted 32 lines · Kleber Sacilotto de Souza

Brian/Wendy,

This is a patch for bug #89324. We were not using the right HRRQ pointer, so we were adding the command to the wrong free queue, which can be not initialized and cause a null-pointer dereference when calling list_add_tail().

Kleber

---
The abort command issued by ipr_cancel_op() is being added to the wrong HRRQ free queue after the command returns. Fix it by using the HRRQ pointer in the ipr command struct itself.

---
 drivers/scsi/ipr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/ipr.c +1 -1
index f328089..b222dae 100644
@@ -5148,7 +5148,7 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd)
 		ipr_trace;
 	}
 
-	list_add_tail(&ipr_cmd->queue, &hrrq->hrrq_free_q);
+	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 	if (!ipr_is_naca_model(res))
 		res->needs_sync_complete = 1;
 
Signature · 2 lines
Kleber Sacilotto de Souza
IBM Linux Technology Center