From: Daniel Borkmann <daniel@iogearbox•net>
To: Arnd Bergmann <arnd@arndb•de>, Alexei Starovoitov <ast@kernel•org>
Cc: Martin KaFai Lau <kafai@fb•com>,
"David S. Miller" <davem@davemloft•net>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH] bpf: fix possible uninitialized access in inactive rotation
Date: Wed, 16 Nov 2016 17:00:10 +0100 [thread overview]
Message-ID: <582C828A.60605@iogearbox.net> (raw)
In-Reply-To: <20161116143836.2448688-1-arnd@arndb.de>
On 11/16/2016 03:38 PM, Arnd Bergmann wrote:
> This newly added code causes a build warning:
>
> kernel/bpf/bpf_lru_list.c: In function '__bpf_lru_list_rotate_inactive':
> kernel/bpf/bpf_lru_list.c:201:28: error: 'next' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> The warning is plausible from looking at the code, though there might
> be non-obvious external constraints that ensure it always works.
>
> Moving the assignment of ->next_inactive_rotation inside of the
> loop makes it obvious to the reader and the compiler when we
> actually want to update ->next.
>
> Fixes: 3a08c2fd7634 ("bpf: LRU List")
> Signed-off-by: Arnd Bergmann <arnd@arndb•de>
Thanks a lot, Arnd, patch was already sent here though:
http://patchwork.ozlabs.org/patch/695202/
prev parent reply other threads:[~2016-11-16 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 14:38 [PATCH] bpf: fix possible uninitialized access in inactive rotation Arnd Bergmann
2016-11-16 16:00 ` Daniel Borkmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=582C828A.60605@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=arnd@arndb$(echo .)de \
--cc=ast@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=kafai@fb$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox