]> Pileus Git - ~andy/linux/commit
tcm_qla2xxx: Clear session s_id + loop_id earlier during shutdown
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 18 May 2012 22:37:53 +0000 (15:37 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Jun 2012 03:12:24 +0000 (20:12 -0700)
commitf2d5d9b90b095ab0e8097b2b0793f4a56ed98147
treeec35bf589f8dad8ccdc932b4fa24dc0e91f3c33b
parentaaf68b753313f1e67fd2e8996e32ab2813f441fa
tcm_qla2xxx: Clear session s_id + loop_id earlier during shutdown

This patch adds a new tcm_qla2xxx_clear_sess_lookup() call to clear session
specific s_id + loop_id entries used for se_node_acl pointer lookup ahead
of releasing se_session within the process context workqueue callback in
tcm_qla2xxx_free_session().

It makes the call in existing tcm_qla2xxx_clear_nacl_from_fcport_map()
code invoked from qlt_unreg_sess() in interrupt context w/ hardware_lock
held, ahead of the process context callback into qlt_free_session_done()
-> tcm_qla2xxx_free_session().

We are doing this to address a race between incoming ATIO or TMR packets
using stale se_node_acl pointer once session shutdown has been invoked via
qlt_unreg_sess() in qla_target.c LLD code, and when the entire tcm_qla2xxx
endpoint has not been forced into shutdown w/ echo 0 > ../$QLA2XXX_PORT/enable

Cc: Joern Engel <joern@logfs.org>
Cc: Roland Dreier <roland@purestorage.com>
Cc: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/tcm_qla2xxx.c