WSL2-Linux-Kernel/drivers/target/iscsi
Bart Van Assche 6eaf69e4ec target/iscsi: Detect conn_cmd_list corruption early
Certain behavior of the initiator can cause the target driver to
send both a reject and a SCSI response. If that happens two
target_put_sess_cmd() calls will occur without the command having
been removed from conn_cmd_list. In other words, conn_cmd_list
will get corrupted once the freed memory is reused. Although the
Linux kernel can detect list corruption if list debugging is
enabled, in this case the context in which list corruption is
detected is not related to the context that caused list corruption.
Hence add WARN_ON() statements that report the context that is
causing list corruption.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
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>
2017-11-04 15:16:10 -07:00
..
cxgbit target: Suppress gcc 7 fallthrough warnings 2017-11-04 15:15:35 -07:00
Kconfig cxgbit: add files for cxgbit.ko 2016-05-09 23:12:54 -07:00
Makefile cxgbit: add files for cxgbit.ko 2016-05-09 23:12:54 -07:00
iscsi_target.c target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd() 2017-11-04 15:16:06 -07:00
iscsi_target.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_auth.c iscsi: ensure RNG is seeded before use 2017-06-19 22:06:28 -04:00
iscsi_target_auth.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_configfs.c iscsi-target: fix memory leak in lio_target_tiqn_addtpg() 2017-11-04 14:45:25 -07:00
iscsi_target_datain_values.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_datain_values.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_device.c target: Fix max_cmd_sn increment w/o cmdsn mutex regressions 2015-09-11 00:32:28 -07:00
iscsi_target_device.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl0.c iscsi-target: Always wait for kthread_should_stop() before kthread exit 2017-05-31 15:12:57 -07:00
iscsi_target_erl0.h iscsi-target: Always wait for kthread_should_stop() before kthread exit 2017-05-31 15:12:57 -07:00
iscsi_target_erl1.c target/iscsi: Use min() in iscsit_dump_data_payload() instead of open-coding it 2017-11-04 15:15:50 -07:00
iscsi_target_erl1.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_erl2.c target/iscsi: Fix spelling of "reallegiance" 2017-02-09 00:39:08 -08:00
iscsi_target_erl2.h target/iscsi: Fix spelling of "reallegiance" 2017-02-09 00:39:08 -08:00
iscsi_target_login.c iscsi-target: Fix iscsi_np reset hung task during parallel delete 2017-08-06 14:41:41 -07:00
iscsi_target_login.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_nego.c iscsi-target: Add login_keys_workaround attribute for non RFC initiators 2017-07-11 10:56:39 -07:00
iscsi_target_nego.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_nodeattrib.c iscsi-target: Move iscsi_target_[core,stat].h under linux include 2015-01-30 13:06:21 -08:00
iscsi_target_nodeattrib.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_parameters.c iscsi-target: Add login_keys_workaround attribute for non RFC initiators 2017-07-11 10:56:39 -07:00
iscsi_target_parameters.h iscsi-target: Add login_keys_workaround attribute for non RFC initiators 2017-07-11 10:56:39 -07:00
iscsi_target_seq_pdu_list.c target/iscsi: Define OFFLOAD_BUF_SIZE once 2017-11-04 15:15:46 -07:00
iscsi_target_seq_pdu_list.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_stat.c target: use per-attribute show and store methods 2015-10-13 22:17:49 -07:00
iscsi_target_tmr.c target/iscsi: Fix spelling of "reallegiance" 2017-02-09 00:39:08 -08:00
iscsi_target_tmr.h target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_tpg.c iscsi-target: fix memory leak in iscsit_release_discovery_tpg() 2017-11-04 14:47:04 -07:00
iscsi_target_tpg.h iscsi-target: Add login_keys_workaround attribute for non RFC initiators 2017-07-11 10:56:39 -07:00
iscsi_target_transport.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_util.c target/iscsi: Detect conn_cmd_list corruption early 2017-11-04 15:16:10 -07:00
iscsi_target_util.h target/iscsi: Remove second argument of __iscsit_free_cmd() 2017-07-06 23:11:26 -07:00