aboutsummaryrefslogtreecommitdiff
path: root/drivers/target/target_core_internal.h
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2013-02-18 18:00:33 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2013-02-18 18:47:20 -0800
commitfcf29481fb8e106daad6688f2e898226ee928992 (patch)
treedabde5fb8908c786e8f22019d552c62961f7d007 /drivers/target/target_core_internal.h
parent71f41fe1fafae2e407ef19d8174207f7ff80b387 (diff)
target: Fix lookup of dynamic NodeACLs during cached demo-mode operation
This patch fixes a bug in core_tpg_check_initiator_node_acl() -> core_tpg_get_initiator_node_acl() where a dynamically created se_node_acl generated during session login would be skipped during subsequent lookup due to the '!acl->dynamic_node_acl' check, causing a new se_node_acl to be created with a duplicate ->initiatorname. This would occur when a fabric endpoint was configured with TFO->tpg_check_demo_mode()=1 + TPF->tpg_check_demo_mode_cache()=1 preventing the release of an existing se_node_acl during se_session shutdown. Also, drop the unnecessary usage of core_tpg_get_initiator_node_acl() within core_dev_init_initiator_node_lun_acl() that originally required the extra '!acl->dynamic_node_acl' check, and just pass the configfs provided se_node_acl pointer instead. Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_internal.h')
-rw-r--r--drivers/target/target_core_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h
index fdc51f8301a1..853bab60e362 100644
--- a/drivers/target/target_core_internal.h
+++ b/drivers/target/target_core_internal.h
@@ -46,7 +46,7 @@ struct se_lun *core_dev_add_lun(struct se_portal_group *, struct se_device *, u3
int core_dev_del_lun(struct se_portal_group *, u32);
struct se_lun *core_get_lun_from_tpg(struct se_portal_group *, u32);
struct se_lun_acl *core_dev_init_initiator_node_lun_acl(struct se_portal_group *,
- u32, char *, int *);
+ struct se_node_acl *, u32, int *);
int core_dev_add_initiator_node_lun_acl(struct se_portal_group *,
struct se_lun_acl *, u32, u32);
int core_dev_del_initiator_node_lun_acl(struct se_portal_group *,