From: Fubo Chen Date: Wed, 9 Feb 2011 23:34:48 +0000 (-0800) Subject: [SCSI] target: fixed missing lock drop in error path X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=85dc98d93f3dc41cce54118a7abab9e6aa616dd2;p=openwrt%2Fstaging%2Fblogic.git [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: Fubo Chen Signed-off-by: Nicholas A. Bellinger Signed-off-by: James Bottomley --- diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 969d72785288..9551ab541f03 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -395,12 +395,14 @@ int core_update_device_list_for_node( printk(KERN_ERR "struct se_dev_entry->se_lun_acl" " already set for demo mode -> explict" " LUN ACL transition\n"); + spin_unlock_irq(&nacl->device_list_lock); return -1; } if (deve->se_lun != lun) { printk(KERN_ERR "struct se_dev_entry->se_lun does" " match passed struct se_lun for demo mode" " -> explict LUN ACL transition\n"); + spin_unlock_irq(&nacl->device_list_lock); return -1; } deve->se_lun_acl = lun_acl;