]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 26 Feb 2014 11:09:41 +0000 (03:09 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2014 04:44:13 +0000 (21:44 -0700)
commitd2c1949c854277b9c4bd10b3e12c21ddf3517a74
treec43e999835bea34f11117af2c26ff6660d8e9f15
parent9b7946975ae8ba68367eb6a13e98dbd19f82ebe5
iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug

commit a2a99cea5ec7c1e47825559f0e75a4efbcf8aee3 upstream.

This patch fixes a bug in iscsit_get_tpg_from_np() where the
tpg->tpg_state sanity check was looking for TPG_STATE_FREE,
instead of != TPG_STATE_ACTIVE.

The latter is expected during a normal TPG shutdown once the
tpg_state goes into TPG_STATE_INACTIVE in order to reject any
new incoming login attempts.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/iscsi_target_tpg.c