diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-05-26 00:33:20 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-28 18:40:59 +0300 |
commit | dc3b8ae9d271897e09b27fa4e4e0000de98590d1 (patch) | |
tree | d801db41bd5c8ced70e67a853d85e09022a75bb6 /tools/include | |
parent | 53c8036cb715f3577a7fe1db6e6ad06e8697b36f (diff) | |
download | linux-dc3b8ae9d271897e09b27fa4e4e0000de98590d1.tar.xz |
bpf: avoid -Wmaybe-uninitialized warning
The stack_map_get_build_id_offset() function is too long for gcc to track
whether 'work' may or may not be initialized at the end of it, leading
to a false-positive warning:
kernel/bpf/stackmap.c: In function 'stack_map_get_build_id_offset':
kernel/bpf/stackmap.c:334:13: error: 'work' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This removes the 'in_nmi_ctx' flag and uses the state of that variable
itself to see if it got initialized.
Fixes: bae77c5eb5b2 ("bpf: enable stackmap with build_id in nmi context")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions