[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1480606078.18162.297.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Thu, 01 Dec 2016 07:27:58 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Artem Savkov <asavkov@...hat.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, jstancek@...hat.com,
steffen.klassert@...unet.com, alexander.h.duyck@...el.com,
YOSHIFUJI Hideaki /
吉藤英明
<yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCH] ip6_offload: check segs for NULL in ipv6_gso_segment.
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.
Powered by blists - more mailing lists