Re: [PATCH for-3.15] scsi/libiscsi: Fix static checker warning on bh locking

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

 



On 03/30/2014 07:26 AM, Or Gerlitz wrote:
> From: Shlomo Pongratz <shlomop@xxxxxxxxxxxx>
> 
> Commit 659743b "[SCSI] libiscsi: Reduce locking contention in fast path" introduced a
> new smatch warning on libiscsi.c "iscsi_xmit_task() warn: inconsistent returns
> bottom_half:: locked (1410 [(-61)]) unlocked (1425 [0], 1425 [s32min-(-1),1-s32max])",
> which we can eliminate by using non bh locking on the nested spin_lock call.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Shlomo Pongratz <shlomop@xxxxxxxxxxxx>
> Signed-off-by: Or Gerlitz <ogerlitz@xxxxxxxxxxxx>
> ---
> 
>  drivers/scsi/libiscsi.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 5b8605c..5087957 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -1411,9 +1411,9 @@ static int iscsi_xmit_task(struct iscsi_conn *conn)
>  		conn->task = NULL;
>  	}
>  	/* regular RX path uses back_lock */
> -	spin_lock_bh(&conn->session->back_lock);
> +	spin_lock(&conn->session->back_lock);
>  	__iscsi_put_task(task);
> -	spin_unlock_bh(&conn->session->back_lock);
> +	spin_unlock(&conn->session->back_lock);
>  	return rc;

Thanks for cleaning this up Or and Shlomo.

Reviewed-by: Mike Christie <michaelc@xxxxxxxxxxx>

--
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