diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 2d29bc0f21cc..75fdb8e3abaa 100644 --- 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..e756262d8df7 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)