All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Steve Wise
	<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] IB/cma: Make the code easier to verify
Date: Mon, 13 Jun 2016 12:54:52 +0300	[thread overview]
Message-ID: <20160613095452.GD5408@leon.nu> (raw)
In-Reply-To: <25a76a5c-dc56-3a75-cdf8-096f89b8e2df-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

On Fri, Jun 10, 2016 at 11:08:25AM -0700, Bart Van Assche wrote:
> Static source code analysis tools like smatch cannot handle functions
> that lock or not lock a mutex depending on the value of the arguments.
> Hence inline the function cma_disable_callback(). Additionally, this
> patch realizes a small performance optimization by reducing the number of
> mutex_lock() and mutex_unlock() calls in the modified functions. With
> this patch applied smatch no longer complains about source file cma.c.
> Without this patch smatch reports the following for this source file:
> 
> drivers/infiniband/core/cma.c:1959: cma_req_handler() warn: inconsistent returns 'mutex:&listen_id->handler_mutex'.
>   Locked on:   line 1880
>                line 1959
>   Unlocked on: line 1941
> drivers/infiniband/core/cma.c:2112: iw_conn_req_handler() warn: inconsistent returns 'mutex:&listen_id->handler_mutex'.
>   Locked on:   line 2048
>   Unlocked on: line 2112
> 
> Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
> Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Cc: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/infiniband/core/cma.c | 54 +++++++++++++++++++++----------------------
>  1 file changed, 26 insertions(+), 28 deletions(-)

Thanks Bart,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-06-13  9:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 18:08 [PATCH] IB/cma: Make the code easier to verify Bart Van Assche
     [not found] ` <25a76a5c-dc56-3a75-cdf8-096f89b8e2df-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-10 18:41   ` Hefty, Sean
2016-06-10 18:58   ` Steve Wise
2016-06-13  9:54   ` Leon Romanovsky [this message]
2016-06-23 14:20   ` Doug Ledford

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=20160613095452.GD5408@leon.nu \
    --to=leon-2ukjvaziz/y@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org \
    /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.