iscsi-target: Fix iscsit_transport reference leak during NP thread reset
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 18 Aug 2013 22:07:44 +0000 (15:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Sep 2013 14:06:45 +0000 (07:06 -0700)
commitdd35452f39a61bd4264efa421b8ccc2623954700
tree17b47d90758668df6acefe64c2af28fd71770e7e
parentb26ae3b80f2bcac064962eea244617c4cad140bb
iscsi-target: Fix iscsit_transport reference leak during NP thread reset

commit c9a03c12464c851e691e8d5b6c9deba779c512e0 upstream.

This patch fixes a bug in __iscsi_target_login_thread() where an explicit
network portal thread reset ends up leaking the iscsit_transport module
reference, along with the associated iscsi_conn allocation.

This manifests itself with iser-target where a NP reset causes the extra
iscsit_transport reference to be taken in iscsit_conn_set_transport()
during the reset, which prevents the ib_isert module from being unloaded
after the NP thread shutdown has finished.

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