From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] net: Prepare gro for packet consuming gro callbacks
Date: Fri, 17 Feb 2017 10:13:05 +0000 [thread overview]
Message-ID: <20170217101304.GJ4162@mwanda> (raw)
In-Reply-To: <20170216201127.GA11170@mwanda>
On Fri, Feb 17, 2017 at 09:18:25AM +0100, Steffen Klassert wrote:
> Hi Dan.
>
> On Thu, Feb 16, 2017 at 11:11:27PM +0300, Dan Carpenter wrote:
> > Hello Steffen Klassert,
> >
> > The patch 25393d3fc055: "net: Prepare gro for packet consuming gro
> > callbacks" from Feb 15, 2017, leads to the following Smatch
> > warning:
> >
> > net/core/dev.c:4522 dev_gro_receive()
> > error: 'pp' dereferencing possible ERR_PTR()
> >
> > net/core/dev.c
> > 4510 if (&ptype->list = head)
> > 4511 goto normal;
> > 4512
> > 4513 if (IS_ERR(pp) && PTR_ERR(pp) = -EINPROGRESS) {
> >
> >
> > Smatch sees this and assumes that it's possible for "pp" to be an error
> > pointer that's not -EINPROGRESS.
>
> pp can be either a vaild pointer, NULL or -EINPROGRESS,
> nothing else. So I guess this is ok.
Could you change it to:
if (PTR_ERR(pp) = -EINPROGRESS) {
That would silence the warning and make the code more clear I think.
regards,
dan carpenter
next prev parent reply other threads:[~2017-02-17 10:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 20:11 [bug report] net: Prepare gro for packet consuming gro callbacks Dan Carpenter
2017-02-17 8:18 ` Steffen Klassert
2017-02-17 10:13 ` Dan Carpenter [this message]
2017-02-17 10:22 ` Steffen Klassert
2017-02-17 10:39 ` Dan Carpenter
2017-02-17 13:39 ` Dan Carpenter
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=20170217101304.GJ4162@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox