summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2016-09-15 17:50:11 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2016-10-20 06:22:31 +0200
commit1a40f0a36fb669226f0fd29aaece5ff7b6399e80 (patch)
tree02c2cc8b191f6d8b26f1a44527341b39795b3acd
parentiscsi-target: fix spelling mistake "Unsolicitied" -> "Unsolicited" (diff)
downloadlinux-1a40f0a36fb669226f0fd29aaece5ff7b6399e80.tar.xz
linux-1a40f0a36fb669226f0fd29aaece5ff7b6399e80.zip
iscsi-target: fix iscsi cmd leak
If iscsi-target receives NOP OUT with ITT and TTT set to 0xffffffff it allocates iscsi_cmd but does not free the cmd, so free iscsi_cmd in this case. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/iscsi/iscsi_target.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 1aaf1f3148b2..b7d747e92c7a 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1804,6 +1804,10 @@ int iscsit_process_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
* Otherwise, initiator is not expecting a NOPIN is response.
* Just ignore for now.
*/
+
+ if (cmd)
+ iscsit_free_cmd(cmd, false);
+
return 0;
}
EXPORT_SYMBOL(iscsit_process_nop_out);