From: David Ahern <dsahern@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>, Dan Carpenter <error27@gmail.com>
Cc: Haoyi Liu <iccccc@hust.edu.cn>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
hust-os-kernel-patches@googlegroups.com, yalongz@hust.edu.cn,
Dongliang Mu <dzm91@hust.edu.cn>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net/ipv6: silence 'passing zero to ERR_PTR()' warning
Date: Tue, 18 Apr 2023 14:46:33 -0600 [thread overview]
Message-ID: <f920c935-3876-c8bc-cb6e-c8740d64a6e4@kernel.org> (raw)
In-Reply-To: <20230417191734.78c18a5f@kernel.org>
On 4/17/23 8:17 PM, Jakub Kicinski wrote:
> On Fri, 14 Apr 2023 09:32:51 +0300 Dan Carpenter wrote:
>> Also it can return NULL.
>>
>> net/xfrm/xfrm_policy.c
>> 3229 dst = dst_orig;
>> 3230 }
>> 3231 ok:
>> 3232 xfrm_pols_put(pols, drop_pols);
>> 3233 if (dst && dst->xfrm &&
>> ^^^
>> "dst" is NULL.
>
> Don't take my word for it, but AFAICT it's impossible to get there with
> dst == NULL. I think we can remove this check instead if that's what
> makes smatch infer that dst may be NULL.
>
That was my conclusion as well staring at it multiple times, but given
the horrible maze of goto's I cannot definitively say that.
next prev parent reply other threads:[~2023-04-18 20:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 10:10 Haoyi Liu
2023-04-13 22:50 ` Jacob Keller
2023-04-14 0:32 ` David Ahern
2023-04-14 6:32 ` Dan Carpenter
2023-04-18 2:17 ` Jakub Kicinski
2023-04-18 20:46 ` David Ahern [this message]
2023-05-11 14:52 ` 刘浩毅
2023-05-11 15:38 ` Jakub Kicinski
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=f920c935-3876-c8bc-cb6e-c8740d64a6e4@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=dzm91@hust.edu.cn \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=hust-os-kernel-patches@googlegroups.com \
--cc=iccccc@hust.edu.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yalongz@hust.edu.cn \
/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
Powered by JetHome