diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-05-25 23:33:19 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-28 17:40:58 +0200 |
commit | 53c8036cb715f3577a7fe1db6e6ad06e8697b36f (patch) | |
tree | b8dcafa05c4731dbd10d7b0ea72440d10d13e2f3 /kernel/bpf | |
parent | a493f5f9d8c2e87f2d1322c01e477502b3cd11c5 (diff) | |
download | linux-53c8036cb715f3577a7fe1db6e6ad06e8697b36f.tar.gz linux-53c8036cb715f3577a7fe1db6e6ad06e8697b36f.tar.bz2 linux-53c8036cb715f3577a7fe1db6e6ad06e8697b36f.zip |
bpf: btf: avoid -Wreturn-type warning
gcc warns about a noreturn function possibly returning in
some configurations:
kernel/bpf/btf.c: In function 'env_type_is_resolve_sink':
kernel/bpf/btf.c:729:1: error: control reaches end of non-void function [-Werror=return-type]
Using BUG() instead of BUG_ON() avoids that warning and otherwise
does the exact same thing.
Fixes: eb3f595dab40 ("bpf: btf: Validate type reference")
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 'kernel/bpf')
-rw-r--r-- | kernel/bpf/btf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 7e90fd13b5b5..3d20aa1f4b54 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -749,7 +749,7 @@ static bool env_type_is_resolve_sink(const struct btf_verifier_env *env, !btf_type_is_array(next_type) && !btf_type_is_struct(next_type); default: - BUG_ON(1); + BUG(); } } |