linux/drivers/target
Nicholas Bellinger d5705c4ab5 iscsi-target: Fix race with thread_pre_handler flush_signals + ISCSI_THREAD_SET_DIE
This patch addresses an long standing race in iscsi_[rx,tx]_thread_pre_handler()
use of flush_signals(), and between iscsi_deallocate_extra_thread_sets() setting
ISCSI_THREAD_SET_DIE before calling kthread_stop().

It addresses the issue by both holding ts_state_lock before calling send_sig()
in iscsi_deallocate_extra_thread_sets(), as well as only calling flush_signals()
when ts->status != ISCSI_THREAD_SET_DIE within iscsi_[rx,tx]_thread_pre_handler()
code.

v2 changes:
  - Add explicit complete(&ts->[rx,tx]_start_comp); before kthread_stop() in
    iscsi_deallocate_extra_thread_sets()
  - Drop left-over send_sig() calls in iscsi_deallocate_extra_thread_sets()
  - Add kthread_should_stop() check in iscsi_signal_thread_pre_handler()

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-09-10 16:48:54 -07:00
..
iscsi iscsi-target: Fix race with thread_pre_handler flush_signals + ISCSI_THREAD_SET_DIE 2013-09-10 16:48:54 -07:00
loopback
sbp
tcm_fc target: replace strict_strto*() with kstrto*() 2013-08-12 20:31:44 -07:00
Kconfig
Makefile target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00
target_core_alua.c target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check 2013-09-10 16:48:42 -07:00
target_core_alua.h
target_core_configfs.c target: Enable global EXTENDED_COPY setup/release 2013-09-10 16:48:47 -07:00
target_core_device.c target: Add Third Party Copy (3PC) bit in INQUIRY response 2013-09-10 16:48:46 -07:00
target_core_fabric_configfs.c target: replace strict_strto*() with kstrto*() 2013-08-12 20:31:44 -07:00
target_core_fabric_lib.c
target_core_file.c target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction 2013-09-09 14:29:28 -07:00
target_core_file.h
target_core_hba.c
target_core_iblock.c target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction 2013-09-09 14:29:28 -07:00
target_core_iblock.h
target_core_internal.h target: Add Third Party Copy (3PC) bit in INQUIRY response 2013-09-10 16:48:46 -07:00
target_core_pr.c
target_core_pr.h
target_core_pscsi.c target/pscsi: remove an unneeded check 2013-09-09 14:29:23 -07:00
target_core_pscsi.h
target_core_rd.c target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction 2013-09-09 14:29:28 -07:00
target_core_rd.h
target_core_sbc.c target: Release COMPARE_AND_WRITE mutex in generic failure path 2013-09-10 16:46:01 -07:00
target_core_spc.c target: Add Third Party Copy (3PC) bit in INQUIRY response 2013-09-10 16:48:46 -07:00
target_core_stat.c
target_core_tmr.c
target_core_tpg.c
target_core_transport.c target: Make helpers non static for EXTENDED_COPY command setup 2013-09-10 16:48:39 -07:00
target_core_ua.c
target_core_ua.h
target_core_xcopy.c target: remove unused including <linux/version.h> 2013-09-10 16:48:53 -07:00
target_core_xcopy.h target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00