--- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -2393,12 +2393,21 @@ void __bpf_trace_run(struct bpf_raw_tp_link *link, u64 *args) cant_sleep(); diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 8d1507dd0724..f852d7b86ff4 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -298,6 +308,8 @@ static enum tp_func_state nr_func_state(const struct tracepoint_func *tp_funcs) { if (!tp_funcs) return TP_FUNC_0; + if (!tp_funcs[0].func) + return TP_FUNC_0; if (!tp_funcs[1].func) return TP_FUNC_1; if (!tp_funcs[2].func)