diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-23 13:56:23 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-23 13:56:23 -0400 |
commit | 57b48a255d94802cd967b8dc58cc938337632929 (patch) | |
tree | cde3a978a76095203ee34e3b813cee9e76691946 | |
parent | 5dd9da17eaad5b4ebcf3d3e8fd5473feb7f50090 (diff) | |
download | longterm-queue-4.12-57b48a255d94802cd967b8dc58cc938337632929.tar.gz |
iscsi: context refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/target-iscsi-Detect-conn_cmd_list-corruption-early.patch | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/queue/target-iscsi-Detect-conn_cmd_list-corruption-early.patch b/queue/target-iscsi-Detect-conn_cmd_list-corruption-early.patch index 83d69fa..65f38e6 100644 --- a/queue/target-iscsi-Detect-conn_cmd_list-corruption-early.patch +++ b/queue/target-iscsi-Detect-conn_cmd_list-corruption-early.patch @@ -1,4 +1,4 @@ -From 6eaf69e4ec075f5af236c0c89f75639a195db904 Mon Sep 17 00:00:00 2001 +From f50ef62f1804d9e9e2a6c1c11208de05374257d3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche <bart.vanassche@wdc.com> Date: Tue, 31 Oct 2017 11:03:18 -0700 Subject: [PATCH] target/iscsi: Detect conn_cmd_list corruption early @@ -21,12 +21,13 @@ Cc: Christoph Hellwig <hch@lst.de> Cc: Mike Christie <mchristi@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c -index 1e36f83b5961..70c6b9bfc04e 100644 +index 7d3e2fcc26a0..19148f4d7b99 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c -@@ -694,6 +694,8 @@ void iscsit_release_cmd(struct iscsi_cmd *cmd) +@@ -693,6 +693,8 @@ void iscsit_release_cmd(struct iscsi_cmd *cmd) struct iscsi_session *sess; struct se_cmd *se_cmd = &cmd->se_cmd; @@ -35,15 +36,15 @@ index 1e36f83b5961..70c6b9bfc04e 100644 if (cmd->conn) sess = cmd->conn->sess; else -@@ -716,6 +718,8 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool check_queues) +@@ -716,6 +718,8 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool scsi_cmd, { struct iscsi_conn *conn = cmd->conn; + WARN_ON(!list_empty(&cmd->i_conn_node)); + - if (cmd->data_direction == DMA_TO_DEVICE) { - iscsit_stop_dataout_timer(cmd); - iscsit_free_r2ts_from_list(cmd); + if (scsi_cmd) { + if (cmd->data_direction == DMA_TO_DEVICE) { + iscsit_stop_dataout_timer(cmd); -- 2.15.0 |