bpf: Fix build without CONFIG_STACKTRACE
authorSong Liu <songliubraving@fb.com>
Fri, 3 Jul 2020 02:45:37 +0000 (19:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 3 Jul 2020 03:21:56 +0000 (20:21 -0700)
commit046cc3dd9a2507b8e111714807ab8bf15ea5bb70
treefdb000010085a84b92a72deb6919b9b2e1021773
parent811d7e375d08312dba23f3b6bf7e58ec14aa5dcb
bpf: Fix build without CONFIG_STACKTRACE

Without CONFIG_STACKTRACE stack_trace_save_tsk() is not defined. Let
get_callchain_entry_for_task() to always return NULL in such cases.

Fixes: fa28dcb82a38 ("bpf: Introduce helper bpf_get_task_stack()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200703024537.79971-1-songliubraving@fb.com
kernel/bpf/stackmap.c