summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-11 16:49:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-11 16:49:09 -0700
commit04e53358ec23b836af5c5718d1c368ba23abc2c2 (patch)
tree7f9ed6b6608df607b5e772fb475fef799af69242 /drivers
parent4e25651b70b8d6ded7229ead8181619e121b648d (diff)
parentcfebf8f42f47327fa54cf05c19b98f4bd5236a26 (diff)
downloadlinux-04e53358ec23b836af5c5718d1c368ba23abc2c2.tar.bz2
Merge branch '3.4-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull target fix from Nicholas Bellinger: "This patch removes some incorrect legacy code to free se_lun_acl memory in the NodeACL release path that could potentially trigger an OOPS during shutdown once dynamic -> explicit initiator NodeACL conversion has occurred. That said, we've been able to trigger an OOPS in v4.0 code for this special case when the associated MappedLUNs had not also been made explicit based on active TPG LUN layout during the conversion, so it really makes senses to go ahead and drop this extra cruft to avoid any possible issues here. This ends up only effecting iscsi-target module code (it's the only user) and is CC'ed to stable." * '3.4-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Drop incorrect se_lun_acl release for dynamic -> explict ACL conversion
Diffstat (limited to 'drivers')
-rw-r--r--drivers/target/target_core_tpg.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 70c3ffb981e7..e320ec24aa1b 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -60,7 +60,6 @@ static void core_clear_initiator_node_from_tpg(
int i;
struct se_dev_entry *deve;
struct se_lun *lun;
- struct se_lun_acl *acl, *acl_tmp;
spin_lock_irq(&nacl->device_list_lock);
for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) {
@@ -81,28 +80,7 @@ static void core_clear_initiator_node_from_tpg(
core_update_device_list_for_node(lun, NULL, deve->mapped_lun,
TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0);
- spin_lock(&lun->lun_acl_lock);
- list_for_each_entry_safe(acl, acl_tmp,
- &lun->lun_acl_list, lacl_list) {
- if (!strcmp(acl->initiatorname, nacl->initiatorname) &&
- (acl->mapped_lun == deve->mapped_lun))
- break;
- }
-
- if (!acl) {
- pr_err("Unable to locate struct se_lun_acl for %s,"
- " mapped_lun: %u\n", nacl->initiatorname,
- deve->mapped_lun);
- spin_unlock(&lun->lun_acl_lock);
- spin_lock_irq(&nacl->device_list_lock);
- continue;
- }
-
- list_del(&acl->lacl_list);
- spin_unlock(&lun->lun_acl_lock);
-
spin_lock_irq(&nacl->device_list_lock);
- kfree(acl);
}
spin_unlock_irq(&nacl->device_list_lock);
}