[PATCHv3 9/8] target: Fix return with spinlock held in scsi3_ua_check()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reported-by: Maurizio Lombardi <mlombard@xxxxxxxxxx>
Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>
---

Hi Maurizio, yup, thanks!

Here's a patch that fixes the issue - it can be applied as 9/8 or
alternatively squashed into 1/8.

Thanks again -- Regards -- Andy


 drivers/target/target_core_ua.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/target/target_core_ua.c b/drivers/target/target_core_ua.c
index 5c9d980..0eac3a9 100644
--- a/drivers/target/target_core_ua.c
+++ b/drivers/target/target_core_ua.c
@@ -53,8 +53,10 @@ target_scsi3_ua_check(struct se_cmd *cmd)
 
 	spin_lock_irq(&nacl->device_list_lock);
 	deve = nacl->device_list[cmd->orig_fe_lun];
-	if (!atomic_read(&deve->ua_count))
+	if (!atomic_read(&deve->ua_count)) {
+		spin_unlock_irq(&nacl->device_list_lock);
 		return 0;
+	}
 	spin_unlock_irq(&nacl->device_list_lock);
 
 	/*
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux