[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191129080432.jnsghajoenturr7v@salvia>
Date: Fri, 29 Nov 2019 09:04:32 +0100
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com
Subject: Re: [PATCH] netfilter: nf_flow_table_offload: Don't use offset
uninitialized in flow_offload_port_{d,s}nat
On Tue, Nov 26, 2019 at 01:12:26PM -0700, Nathan Chancellor wrote:
> Clang warns (trimmed the second warning for brevity):
>
> ../net/netfilter/nf_flow_table_offload.c:342:2: warning: variable
> 'offset' is used uninitialized whenever switch default is taken
> [-Wsometimes-uninitialized]
> default:
> ^~~~~~~
> ../net/netfilter/nf_flow_table_offload.c:346:57: note: uninitialized use
> occurs here
> flow_offload_mangle(entry, flow_offload_l4proto(flow), offset,
> ^~~~~~
> ../net/netfilter/nf_flow_table_offload.c:331:12: note: initialize the
> variable 'offset' to silence this warning
> u32 offset;
> ^
> = 0
>
> Match what was done in the flow_offload_ipv{4,6}_{d,s}nat functions and
> just return in the default case, since port would also be uninitialized.
Applied, thanks.
Powered by blists - more mailing lists