kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] net: Prepare gro for packet consuming gro callbacks
Date: Thu, 16 Feb 2017 20:11:27 +0000	[thread overview]
Message-ID: <20170216201127.GA11170@mwanda> (raw)

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.


  4514                  ret = GRO_CONSUMED;
  4515                  goto ok;
  4516          }
  4517  
  4518          same_flow = NAPI_GRO_CB(skb)->same_flow;
  4519          ret = NAPI_GRO_CB(skb)->free ? GRO_MERGED_FREE : GRO_MERGED;
  4520  
  4521          if (pp) {
  4522                  struct sk_buff *nskb = *pp;
                                               ^^^
Leading to an oops.

  4523  
  4524                  *pp = nskb->next;
  4525                  nskb->next = NULL;
  4526                  napi_gro_complete(nskb);
  4527                  napi->gro_count--;
  4528          }

regards,
dan carpenter

             reply	other threads:[~2017-02-16 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 20:11 Dan Carpenter [this message]
2017-02-17  8:18 ` [bug report] net: Prepare gro for packet consuming gro callbacks Steffen Klassert
2017-02-17 10:13 ` Dan Carpenter
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=20170216201127.GA11170@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;
as well as URLs for NNTP newsgroup(s).