summaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2013-02-18 18:00:33 -0800
committerBen Hutchings <ben@decadent.org.uk>2013-03-06 03:24:03 +0000
commitf310bed9032a920cc5c7adb873caa0191fdf760e (patch)
tree51525c3b1375179f2491779b6f22f15edb2e5fe3 /include/target
parent9e2282d4b05fdc74ef5677174d3146494dff64a9 (diff)
downloadlwn-f310bed9032a920cc5c7adb873caa0191fdf760e.tar.gz
lwn-f310bed9032a920cc5c7adb873caa0191fdf760e.zip
target: Fix lookup of dynamic NodeACLs during cached demo-mode operation
commit fcf29481fb8e106daad6688f2e898226ee928992 upstream. 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. Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> [bwh: Backported to 3.2: adjust context, filename of header] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/target/target_core_device.h b/include/target/target_core_device.h
index 2be31ff8763b..6f30e700da28 100644
--- a/include/target/target_core_device.h
+++ b/include/target/target_core_device.h
@@ -50,7 +50,7 @@ extern struct se_lun *core_dev_add_lun(struct se_portal_group *, struct se_hba *
extern int core_dev_del_lun(struct se_portal_group *, u32);
extern struct se_lun *core_get_lun_from_tpg(struct se_portal_group *, u32);
extern struct se_lun_acl *core_dev_init_initiator_node_lun_acl(struct se_portal_group *,
- u32, char *, int *);
+ struct se_node_acl *, u32, int *);
extern int core_dev_add_initiator_node_lun_acl(struct se_portal_group *,
struct se_lun_acl *, u32, u32);
extern int core_dev_del_initiator_node_lun_acl(struct se_portal_group *,