lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ