Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1523630

Re: [PATCH] bpf: fix possible uninitialized access in inactive rotation

From Daniel Borkmann <daniel@iogearbox.net>
Newsgroups linux.kernel
Subject Re: [PATCH] bpf: fix possible uninitialized access in inactive rotation
Date 2016-11-16 17:10 +0100
Message-ID <sEaWB-56K-3@gated-at.bofh.it> (permalink)
References <sE9xw-48I-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] bpf: fix possible uninitialized access in inactive rotation Arnd Bergmann <arnd@arndb.de> - 2016-11-16 15:40 +0100
  Re: [PATCH] bpf: fix possible uninitialized access in inactive rotation Daniel Borkmann <daniel@iogearbox.net> - 2016-11-16 17:10 +0100

csiph-web