]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
iscsi-target: Add missing F_BIT for iscsi_tm_rsp
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 28 Nov 2011 06:25:14 +0000 (22:25 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 6 Dec 2011 06:00:54 +0000 (06:00 +0000)
This patch sets the missing ISCSI_FLAG_CMD_FINAL bit in
iscsit_send_task_mgt_rsp() for a struct iscsi_tm_rsp PDU.

This usage is hardcoded for all TM response PDUs in RFC-3720
section 10.6.

Reported-by: whucecil <whucecil1999@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c

index 26834eff8960d4718036575c36992e1cccbaf42b..02de527940de4490e2d6c58ad9b4a2c6974ffd5b 100644 (file)
@@ -3130,6 +3130,7 @@ static int iscsit_send_task_mgt_rsp(
        hdr                     = (struct iscsi_tm_rsp *) cmd->pdu;
        memset(hdr, 0, ISCSI_HDR_LEN);
        hdr->opcode             = ISCSI_OP_SCSI_TMFUNC_RSP;
+       hdr->flags              = ISCSI_FLAG_CMD_FINAL;
        hdr->response           = iscsit_convert_tcm_tmr_rsp(se_tmr);
        hdr->itt                = cpu_to_be32(cmd->init_task_tag);
        cmd->stat_sn            = conn->stat_sn++;