Re: [PATCHv3 1/8] target: Add locking to some accesses to nacl.device_list

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

 



Hi Andy,

On 07/01/2014 01:39 AM, Andy Grover wrote:
> diff --git a/drivers/target/target_core_ua.c b/drivers/target/target_core_ua.c
> index 101858e..5c9d980 100644
> --- a/drivers/target/target_core_ua.c
> +++ b/drivers/target/target_core_ua.c
> @@ -51,9 +51,12 @@ target_scsi3_ua_check(struct se_cmd *cmd)
>  	if (!nacl)
>  		return 0;
>  
> +	spin_lock_irq(&nacl->device_list_lock);
>  	deve = nacl->device_list[cmd->orig_fe_lun];
>  	if (!atomic_read(&deve->ua_count))
>  		return 0;
> +	spin_unlock_irq(&nacl->device_list_lock);
> +

Shouldn't the spinlock unlocked before the "return 0;" ?

Regards,
Maurizio Lombardi
--
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