All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Or Gerlitz <ogerlitz@mellanox.com>
Cc: James.Bottomley@HansenPartnership.com,
	linux-scsi@vger.kernel.org,
	Shlomo Pongratz <shlomop@mellanox.com>
Subject: Re: [PATCH for-3.15] scsi/libiscsi: Fix static checker warning on bh locking
Date: Mon, 31 Mar 2014 01:59:39 -0500	[thread overview]
Message-ID: <5339125B.6020405@cs.wisc.edu> (raw)
In-Reply-To: <1396182389-4910-1-git-send-email-ogerlitz@mellanox.com>

On 03/30/2014 07:26 AM, Or Gerlitz wrote:
> From: Shlomo Pongratz <shlomop@mellanox.com>
> 
> 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@oracle.com>
> Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> ---
> 
>  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@cs.wisc.edu>


      reply	other threads:[~2014-03-31  6:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30 12:26 [PATCH for-3.15] scsi/libiscsi: Fix static checker warning on bh locking Or Gerlitz
2014-03-31  6:59 ` Mike Christie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5339125B.6020405@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=shlomop@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.