Skip to contentSkip to conversation

Patch "qla2xxx: Fix wrong IOCB type assumption" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

qla2xxx: Fix wrong IOCB type assumption

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
qla2xxx-fix-wrong-iocb-type-assumption.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Dec 6 17:39:55 CET 2017

From: Quinn Tran <[email protected]>
Date: Fri, 23 Dec 2016 18:06:05 -0800
Subject: qla2xxx: Fix wrong IOCB type assumption

From: Quinn Tran <[email protected]>

[ Upstream commit bb1181c9a8b46b6f10e749d9ed94480336445d7f ]

qlt_reset is called with Immedidate Notify IOCB only. Current code wrongly cast it as ATIO IOCB.

---
 drivers/scsi/qla2xxx/qla_target.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +1 -7
@@ -668,11 +668,9 @@ static int qlt_reset(struct scsi_qla_hos
 {
 	struct qla_hw_data *ha = vha->hw;
 	struct qla_tgt_sess *sess = NULL;
-	uint32_t unpacked_lun, lun = 0;
 	uint16_t loop_id;
 	int res = 0;
 	struct imm_ntfy_from_isp *n = (struct imm_ntfy_from_isp *)iocb;
-	struct atio_from_isp *a = (struct atio_from_isp *)iocb;
 	unsigned long flags;
 
 	loop_id = le16_to_cpu(n->u.isp24.nport_handle);
@@ -725,11 +723,7 @@ static int qlt_reset(struct scsi_qla_hos
 	    "loop_id %d)\n", vha->host_no, sess, sess->port_name,
 	    mcmd, loop_id);
 
-	lun = a->u.isp24.fcp_cmnd.lun;
-	unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun);
-
-	return qlt_issue_task_mgmt(sess, unpacked_lun, mcmd,
-	    iocb, QLA24XX_MGMT_SEND_NACK);
+	return qlt_issue_task_mgmt(sess, 0, mcmd, iocb, QLA24XX_MGMT_SEND_NACK);
 }
 
 /* ha->tgt.sess_lock supposed to be held on entry */

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/qla2xxx-fix-wrong-iocb-type-assumption.patch