summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-05-26 00:33:19 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-05-28 18:40:58 +0300
commit53c8036cb715f3577a7fe1db6e6ad06e8697b36f (patch)
treeb8dcafa05c4731dbd10d7b0ea72440d10d13e2f3 /kernel/bpf
parenta493f5f9d8c2e87f2d1322c01e477502b3cd11c5 (diff)
downloadlinux-53c8036cb715f3577a7fe1db6e6ad06e8697b36f.tar.xz
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.c2
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();
}
}