[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220216075556.39018f02@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 16 Feb 2022 07:55:56 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: menglong8.dong@...il.com
Cc: dsahern@...nel.org, edumazet@...gle.com, davem@...emloft.net,
rostedt@...dmis.org, mingo@...hat.com, yoshfuji@...ux-ipv6.org,
ast@...nel.org, daniel@...earbox.net, hawk@...nel.org,
john.fastabend@...il.com, imagedong@...cent.com,
talalahmad@...gle.com, keescook@...omium.org,
ilias.apalodimas@...aro.org, alobakin@...me, memxor@...il.com,
atenart@...nel.org, bigeasy@...utronix.de, pabeni@...hat.com,
linyunsheng@...wei.com, arnd@...db.de, yajun.deng@...ux.dev,
roopa@...dia.com, willemb@...gle.com, vvs@...tuozzo.com,
cong.wang@...edance.com, luiz.von.dentz@...el.com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org, flyingpeng@...cent.com
Subject: Re: [PATCH net-next 6/9] net: tcp: use kfree_skb_reason() for
tcp_v{4,6}_do_rcv()
On Wed, 16 Feb 2022 11:54:23 +0800 menglong8.dong@...il.com wrote:
> From: Menglong Dong <imagedong@...cent.com>
>
> Replace kfree_skb() used in tcp_v4_do_rcv() and tcp_v6_do_rcv() with
> kfree_skb_reason().
>
> Signed-off-by: Menglong Dong <imagedong@...cent.com>
Clang says:
net/ipv6/tcp_ipv6.c:1556:6: warning: variable 'reason' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (tcp_rcv_state_process(sk, skb))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv6/tcp_ipv6.c:1567:24: note: uninitialized use occurs here
kfree_skb_reason(skb, reason);
^~~~~~
net/ipv6/tcp_ipv6.c:1556:2: note: remove the 'if' if its condition is always false
if (tcp_rcv_state_process(sk, skb))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv6/tcp_ipv6.c:1547:8: warning: variable 'reason' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (tcp_child_process(sk, nsk, skb))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv6/tcp_ipv6.c:1567:24: note: uninitialized use occurs here
kfree_skb_reason(skb, reason);
^~~~~~
net/ipv6/tcp_ipv6.c:1547:4: note: remove the 'if' if its condition is always false
if (tcp_child_process(sk, nsk, skb))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv6/tcp_ipv6.c:1543:7: warning: variable 'reason' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!nsk)
^~~~
net/ipv6/tcp_ipv6.c:1567:24: note: uninitialized use occurs here
kfree_skb_reason(skb, reason);
^~~~~~
net/ipv6/tcp_ipv6.c:1543:3: note: remove the 'if' if its condition is always false
if (!nsk)
^~~~~~~~~
net/ipv6/tcp_ipv6.c:1479:2: note: variable 'reason' is declared here
enum skb_drop_reason reason;
^
Powered by blists - more mailing lists