All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jinpu Wang <jinpu.wang@cloud.ionos.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-rdma@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Leon Romanovsky <leon@kernel.org>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Danil Kipnis <danil.kipnis@cloud.ionos.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] RDMA/rtrs-srv: Suppress warnings passing zero to 'PTR_ERR'
Date: Wed, 17 Feb 2021 07:36:47 +0100	[thread overview]
Message-ID: <CAMGffEnRLV9cO-LE1tpfY6=dynZR50rDODPn+Be2ydWZkdNxow@mail.gmail.com> (raw)
In-Reply-To: <20210216144938.GG2222@kadam>

On Tue, Feb 16, 2021 at 3:49 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> On Tue, Feb 16, 2021 at 03:38:07PM +0100, Jack Wang wrote:
> > smatch warnings:
> > drivers/infiniband/ulp/rtrs/rtrs-srv.c:1805 rtrs_rdma_connect() warn: passing zero to 'PTR_ERR'
> >
> > Smatch seems confused by the refcount_read condition, the solution is
> > protect move the list_add down after full initilization of rtrs_srv.
>
> In theory if Smatch had a properly up to date DB then it would print a
> different warning "passing a valid pointer to PTR_ERR()".
That will be easier to follow :)
>
> regards,
> dan carpenter
>
Thanks!

  reply	other threads:[~2021-02-17  6:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 14:38 [PATCH] RDMA/rtrs-srv: Suppress warnings passing zero to 'PTR_ERR' Jack Wang
2021-02-16 14:49 ` Dan Carpenter
2021-02-17  6:36   ` Jinpu Wang [this message]
2021-02-17 13:38 ` Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2021-02-16  7:39 [PATCH] RDMA/rtrs-srv: suppress " Jack Wang
2021-02-16  7:50 ` Leon Romanovsky
2021-02-16  8:02   ` Jinpu Wang
2021-02-16  8:17     ` Leon Romanovsky
2021-02-16  9:40       ` Jinpu Wang

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='CAMGffEnRLV9cO-LE1tpfY6=dynZR50rDODPn+Be2ydWZkdNxow@mail.gmail.com' \
    --to=jinpu.wang@cloud.ionos.com \
    --cc=bvanassche@acm.org \
    --cc=dan.carpenter@oracle.com \
    --cc=danil.kipnis@cloud.ionos.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkp@intel.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.