alistair23-linux/drivers/target/iscsi
Mike Christie 05a86e78ea scsi: iscsi: target: Fix conn_ops double free
If iscsi_login_init_conn fails it can free conn_ops.
__iscsi_target_login_thread will then call iscsi_target_login_sess_out
which will also free it.

This fixes the problem by organizing conn allocation/setup into parts that
are needed through the life of the conn and parts that are only needed for
the login. The free functions then release what was allocated in the alloc
functions.

With this patch we have:

iscsit_alloc_conn/iscsit_free_conn - allocs/frees the conn we need for the
entire life of the conn.

iscsi_login_init_conn/iscsi_target_nego_release - allocs/frees the parts
of the conn that are only needed during login.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-08-30 07:07:12 -04:00
..
cxgbit scsi: target: iscsi: cxgbit: use pr_debug() instead of pr_info() 2018-08-27 12:26:10 -04:00
iscsi_target.c scsi: iscsi: target: Fix conn_ops double free 2018-08-30 07:07:12 -04:00
iscsi_target.h target/iscsi: Allocate session IDs from an IDA 2018-08-21 23:54:19 -04:00
iscsi_target_auth.c target/iscsi: avoid NULL dereference in CHAP auth error path 2018-01-12 15:07:27 -08:00
iscsi_target_auth.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_configfs.c Revert "scsi: target/iscsi: Reduce number of __iscsit_free_cmd() callers" 2018-07-30 23:30:51 -04:00
iscsi_target_datain_values.c target: Minimize #include directives 2016-12-09 10:22:28 -08:00
iscsi_target_datain_values.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_erl0.c target/iscsi: Convert timers to use timer_setup() 2017-11-01 11:44:50 -07:00
iscsi_target_erl0.h Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
iscsi_target_erl1.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-11-24 19:19:20 -10:00
iscsi_target_erl1.h Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
iscsi_target_erl2.c target/iscsi: Fix spelling of "reallegiance" 2017-02-09 00:39:08 -08:00
iscsi_target_erl2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_login.c scsi: iscsi: target: Fix conn_ops double free 2018-08-30 07:07:12 -04:00
iscsi_target_login.h scsi: iscsi: target: Fix conn_ops double free 2018-08-30 07:07:12 -04:00
iscsi_target_nego.c iscsi-target: make sure to wake up sleeping login worker 2018-01-23 23:03:54 -08:00
iscsi_target_nego.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_parameters.c iSCSI-target: Use common error handling code in iscsi_decode_text_input() 2017-11-04 15:17:49 -07:00
iscsi_target_parameters.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_stat.c target: make config_item_type const 2017-10-19 16:15:17 +02:00
iscsi_target_tmr.c target/iscsi: Fix spelling of "reallegiance" 2017-02-09 00:39:08 -08:00
iscsi_target_tmr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_tpg.c scsi: target/iscsi: Make iscsit_ta_authentication() respect the output buffer size 2018-07-02 16:44:31 -04:00
iscsi_target_tpg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_transport.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iscsi_target_util.c scsi: iscsi target: have iscsit_start_nopin_timer call __iscsit_start_nopin_timer 2018-08-02 15:29:31 -04:00
iscsi_target_util.h Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
Kconfig cxgbit: add files for cxgbit.ko 2016-05-09 23:12:54 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00