Skip to content

Commit 96b98a6

Browse files
hbathiniAlexei Starovoitov
authored andcommitted
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/[email protected]/ Acked-by: Baoquan He <[email protected]> Fixes: 02aff84 ("crash: split crash dumping code out from kexec_core.c") Acked-by: Jiri Olsa <[email protected]> Acked-by: Stanislav Fomichev <[email protected]> Signed-off-by: Hari Bathini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent afbf75e commit 96b98a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@ __bpf_kfunc void bpf_throw(u64 cookie)
25482548
__bpf_kfunc_end_defs();
25492549

25502550
BTF_KFUNCS_START(generic_btf_ids)
2551-
#ifdef CONFIG_KEXEC_CORE
2551+
#ifdef CONFIG_CRASH_DUMP
25522552
BTF_ID_FLAGS(func, crash_kexec, KF_DESTRUCTIVE)
25532553
#endif
25542554
BTF_ID_FLAGS(func, bpf_obj_new_impl, KF_ACQUIRE | KF_RET_NULL)

0 commit comments

Comments
 (0)