[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <72e290be-9044-f6d3-f885-26a30d1e1957@iogearbox.net>
Date: Thu, 17 Jan 2019 10:41:23 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Peter Oskolkov <posk@...gle.com>,
Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org
Cc: Peter Oskolkov <posk.devel@...il.com>,
Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH bpf-next v2] bpf: fix a (false) compiler warning
On 01/16/2019 07:43 PM, Peter Oskolkov wrote:
> An older GCC compiler complains:
>
> kernel/bpf/verifier.c: In function 'bpf_check':
> kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized
> in this function [-Werror=maybe-uninitialized]
> } else if (krecord[i].insn_offset <= prev_offset) {
> ^
> kernel/bpf/verifier.c:4***:38: note: 'prev_offset' was declared here
> u32 i, nfuncs, urec_size, min_size, prev_offset;
>
> Although the compiler is wrong here, the patch makes sure
> that prev_offset is always initialized, just to silence the warning.
>
> v2: fix a spelling error in the commit message.
>
> Signed-off-by: Peter Oskolkov <posk@...gle.com>
Applied, thanks!
Powered by blists - more mailing lists