summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-05-25 23:33:19 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2018-05-28 17:40:58 +0200
commit53c8036cb715f3577a7fe1db6e6ad06e8697b36f (patch)
treeb8dcafa05c4731dbd10d7b0ea72440d10d13e2f3 /kernel/bpf
parenta493f5f9d8c2e87f2d1322c01e477502b3cd11c5 (diff)
downloadop-kernel-dev-53c8036cb715f3577a7fe1db6e6ad06e8697b36f.zip
op-kernel-dev-53c8036cb715f3577a7fe1db6e6ad06e8697b36f.tar.gz
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 7e90fd1..3d20aa1 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();
}
}
OpenPOWER on IntegriCloud