From: Eric Dumazet <eric.dumazet@gmail.com>
To: Artem Savkov <asavkov@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jstancek@redhat.com,
steffen.klassert@secunet.com, alexander.h.duyck@intel.com,
"YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH] ip6_offload: check segs for NULL in ipv6_gso_segment.
Date: Thu, 01 Dec 2016 07:27:58 -0800 [thread overview]
Message-ID: <1480606078.18162.297.camel@edumazet-glaptop3.roam.corp.google.com> (raw)
In-Reply-To: <20161201150703.dv463hxgqajqo6pm@shodan.usersys.redhat.com>
On Thu, 2016-12-01 at 16:07 +0100, Artem Savkov wrote:
> I am not, but this would have the same behavior as pre-07b26c9 code and
> IS_ERR_OR_NULL is used in ipv4's inet_gso_segment().
My concern might have been that IS_ERR_OR_NULL() considers the !ptr to
be unlikely.
But in this code path, we really can not tell.
segs == NULL can be quite likely in TUN case, because of DODGY bit
Commit 50c3a487d50756 replaced the perfectly fine :
if (!segs || IS_ERR(segs))
into dubious
if (IS_ERR_OR_NULL(segs))
segs = NULL is not an error, but use of IS_ERR_OR_NULL() might mislead
programmers trying to understand this code.
next prev parent reply other threads:[~2016-12-01 15:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 13:06 Artem Savkov
2016-12-01 14:34 ` Eric Dumazet
2016-12-01 15:07 ` Artem Savkov
2016-12-01 15:27 ` Eric Dumazet [this message]
2016-12-01 15:19 ` Eric Dumazet
2016-12-02 18:36 ` David Miller
2016-12-02 2:47 Don Bowman
2016-12-02 11:57 ` Artem Savkov
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=1480606078.18162.297.camel@edumazet-glaptop3.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=asavkov@redhat.com \
--cc=davem@davemloft.net \
--cc=jstancek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=yoshfuji@linux-ipv6.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
all inboxes | Powered by JetHome®