linux-uconsole/drivers/target
Nicholas Bellinger 92eba7ddb9 iscsi-target: Fix iser explicit logout TX kthread leak
commit 007d038bdf upstream.

This patch fixes a regression introduced with the following commit
in v4.0-rc1 code, where an explicit iser-target logout would result
in ->tx_thread_active being incorrectly cleared by the logout post
handler, and subsequent TX kthread leak:

    commit 88dcd2dab5
    Author: Nicholas Bellinger <nab@linux-iscsi.org>
    Date:   Thu Feb 26 22:19:15 2015 -0800

        iscsi-target: Convert iscsi_thread_set usage to kthread.h

To address this bug, change iscsit_logout_post_handler_closesession()
and iscsit_logout_post_handler_samecid() to only cmpxchg() on
->tx_thread_active for traditional iscsi/tcp connections.

This is required because iscsi/tcp connections are invoking logout
post handler logic directly from TX kthread context, while iser
connections are invoking logout post handler logic from a seperate
workqueue context.

Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-10 12:20:31 -07:00
..
iscsi iscsi-target: Fix iser explicit logout TX kthread leak 2015-08-10 12:20:31 -07:00
loopback tcm_loop: Fix wrong I_T nexus association 2015-02-05 22:35:40 -08:00
sbp Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-03-02 11:43:27 -08:00
tcm_fc tcm_fc: missing curly braces in ft_invl_hw_context() 2015-04-13 14:02:11 +02:00
Kconfig sbp-target: Initial merge of firewire/ieee-1394 target mode support 2012-05-09 15:25:17 -07:00
Makefile target: move code for CDB emulation 2012-07-16 17:27:45 -07:00
target_core_alua.c target: Allow READ_CAPACITY opcode in ALUA Standby access state 2014-06-16 13:42:53 -07:00
target_core_alua.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00
target_core_configfs.c target: Fix alua_access_state attribute OOPs for un-configured devices 2014-06-16 13:42:53 -07:00
target_core_device.c target: Drop arbitrary maximum I/O size limit 2015-02-05 22:35:41 -08:00
target_core_fabric_configfs.c target: Add missing mapped_lun bounds checking during make_mappedlun setup 2013-02-18 18:47:28 -08:00
target_core_fabric_lib.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_file.c target: Drop arbitrary maximum I/O size limit 2015-02-05 22:35:41 -08:00
target_core_file.h target/file: Update hw_max_sectors based on current block_size 2014-01-09 12:24:20 -08:00
target_core_hba.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_iblock.c target: Drop arbitrary maximum I/O size limit 2015-02-05 22:35:41 -08:00
target_core_iblock.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_internal.h target: Remove unused struct members in se_dev_entry 2013-05-03 16:42:18 -07:00
target_core_pr.c target: Allow Write Exclusive non-reservation holders to READ 2015-03-26 15:01:02 +01:00
target_core_pr.h target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-11-14 08:47:57 -08:00
target_core_pscsi.c target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST 2015-06-05 23:19:55 -07:00
target_core_pscsi.h target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST 2015-06-05 23:19:55 -07:00
target_core_rd.c target: Explicitly clear ramdisk_mcp backend pages 2014-06-30 20:09:45 -07:00
target_core_rd.h target/rd: Add ramdisk bit for NULLIO operation 2013-05-11 16:22:39 -07:00
target_core_sbc.c target: Check for LBA + sectors wrap-around in sbc_parse_cdb 2015-03-18 13:22:28 +01:00
target_core_spc.c target: Drop arbitrary maximum I/O size limit 2015-02-05 22:35:41 -08:00
target_core_stat.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_tmr.c target: Remove useless if statement 2013-02-13 11:27:22 -08:00
target_core_tpg.c target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-11-14 08:47:57 -08:00
target_core_transport.c target: Fix reference leak in target_get_sess_cmd() error path 2015-03-26 15:01:01 +01:00
target_core_ua.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_ua.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00