提交 85dc98d9 编写于 作者: F Fubo Chen 提交者: James Bottomley

[SCSI] target: fixed missing lock drop in error path

The struct se_node_acl->device_list_lock needs to be released if either
sanity check for struct se_dev_entry->se_lun_acl or deve->se_lun fails.
Signed-off-by: NFubo Chen <fubo.chen@gmail.com>
Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 29fe609d
...@@ -395,12 +395,14 @@ int core_update_device_list_for_node( ...@@ -395,12 +395,14 @@ int core_update_device_list_for_node(
printk(KERN_ERR "struct se_dev_entry->se_lun_acl" printk(KERN_ERR "struct se_dev_entry->se_lun_acl"
" already set for demo mode -> explict" " already set for demo mode -> explict"
" LUN ACL transition\n"); " LUN ACL transition\n");
spin_unlock_irq(&nacl->device_list_lock);
return -1; return -1;
} }
if (deve->se_lun != lun) { if (deve->se_lun != lun) {
printk(KERN_ERR "struct se_dev_entry->se_lun does" printk(KERN_ERR "struct se_dev_entry->se_lun does"
" match passed struct se_lun for demo mode" " match passed struct se_lun for demo mode"
" -> explict LUN ACL transition\n"); " -> explict LUN ACL transition\n");
spin_unlock_irq(&nacl->device_list_lock);
return -1; return -1;
} }
deve->se_lun_acl = lun_acl; deve->se_lun_acl = lun_acl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册