https://github.com/torvalds/linux
Revision 46c1e0621a72e0469ec4edfdb6ed4d387ec34f8a authored by Nathan Chancellor on 27 May 2020, 08:10:39 UTC, committed by Pablo Neira Ayuso on 27 May 2020, 11:38:58 UTC
Clang warns:

net/netfilter/nf_conntrack_core.c:2068:21: warning: variable 'ctinfo' is
uninitialized when used here [-Wuninitialized]
        nf_ct_set(skb, ct, ctinfo);
                           ^~~~~~
net/netfilter/nf_conntrack_core.c:2024:2: note: variable 'ctinfo' is
declared here
        enum ip_conntrack_info ctinfo;
        ^
1 warning generated.

nf_conntrack_update was split up into nf_conntrack_update and
__nf_conntrack_update, where the assignment of ctinfo is in
nf_conntrack_update but it is used in __nf_conntrack_update.

Pass the value of ctinfo from nf_conntrack_update to
__nf_conntrack_update so that uninitialized memory is not used
and everything works properly.

Fixes: ee04805ff54a ("netfilter: conntrack: make conntrack userspace helpers work again")
Link: https://github.com/ClangBuiltLinux/linux/issues/1039
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent a4976a3
History
Tip revision: 46c1e0621a72e0469ec4edfdb6ed4d387ec34f8a authored by Nathan Chancellor on 27 May 2020, 08:10:39 UTC
netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update
Tip revision: 46c1e06
File Mode Size
unittest-data
Kconfig -rw-r--r-- 2.4 KB
Makefile -rw-r--r-- 659 bytes
address.c -rw-r--r-- 25.6 KB
base.c -rw-r--r-- 59.4 KB
device.c -rw-r--r-- 8.2 KB
dynamic.c -rw-r--r-- 22.6 KB
fdt.c -rw-r--r-- 31.6 KB
fdt_address.c -rw-r--r-- 6.2 KB
irq.c -rw-r--r-- 18.6 KB
kobj.c -rw-r--r-- 3.8 KB
of_mdio.c -rw-r--r-- 14.3 KB
of_net.c -rw-r--r-- 3.4 KB
of_numa.c -rw-r--r-- 3.9 KB
of_private.h -rw-r--r-- 5.7 KB
of_reserved_mem.c -rw-r--r-- 10.3 KB
overlay.c -rw-r--r-- 33.9 KB
pdt.c -rw-r--r-- 4.8 KB
platform.c -rw-r--r-- 20.0 KB
property.c -rw-r--r-- 38.7 KB
resolver.c -rw-r--r-- 8.7 KB
unittest.c -rw-r--r-- 91.5 KB

back to top