Commit 96b98a65 authored by Hari Bathini's avatar Hari Bathini Committed by Alexei Starovoitov

bpf: fix warning for crash_kexec

With [1], crash dump specific code is moved out of CONFIG_KEXEC_CORE
and placed under CONFIG_CRASH_DUMP, where it is more appropriate.
And since CONFIG_KEXEC & !CONFIG_CRASH_DUMP build option is supported
with that, it led to the below warning:

  "WARN: resolve_btfids: unresolved symbol crash_kexec"

Fix it by using the appropriate #ifdef.

[1] https://lore.kernel.org/all/20240124051254.67105-1-bhe@redhat.com/Acked-by: default avatarBaoquan He <bhe@redhat.com>
Fixes: 02aff848 ("crash: split crash dumping code out from kexec_core.c")
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Acked-by: default avatarStanislav Fomichev <sdf@google.com>
Signed-off-by: default avatarHari Bathini <hbathini@linux.ibm.com>
Link: https://lore.kernel.org/r/20240319080152.36987-1-hbathini@linux.ibm.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent afbf75e8
......@@ -2548,7 +2548,7 @@ __bpf_kfunc void bpf_throw(u64 cookie)
__bpf_kfunc_end_defs();
BTF_KFUNCS_START(generic_btf_ids)
#ifdef CONFIG_KEXEC_CORE
#ifdef CONFIG_CRASH_DUMP
BTF_ID_FLAGS(func, crash_kexec, KF_DESTRUCTIVE)
#endif
BTF_ID_FLAGS(func, bpf_obj_new_impl, KF_ACQUIRE | KF_RET_NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment