diff options
author | Nicholas Bellinger | 2013-12-11 15:45:32 -0800 |
---|---|---|
committer | Nicholas Bellinger | 2013-12-19 00:18:25 -0800 |
commit | db6077fd0b7dd41dc6ff18329cec979379071f87 (patch) | |
tree | 7491659574ec90fa70a41fa3401aadc8ab55e3cb /tools | |
parent | 63832aabec12a28a41a221773ab3819d30ba0a67 (diff) |
iscsi-target: Fix incorrect np->np_thread NULL assignment
When shutting down a target there is a race condition between
iscsit_del_np() and __iscsi_target_login_thread().
The latter sets the thread pointer to NULL, and the former
tries to issue kthread_stop() on that pointer without any
synchronization.
This patch moves the np->np_thread NULL assignment into
iscsit_del_np(), after kthread_stop() has completed. It also
removes the signal_pending() + np_state check, and only
exits when kthread_should_stop() is true.
Reported-by: Hannes Reinecke <hare@suse.de>
Cc: <stable@vger.kernel.org> #3.12+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions