]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Return -EINVAL if WARN_ON(!glob) triggered in event_hist_trigger_parse()
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>
Sun, 17 Apr 2022 18:56:29 +0000 (01:56 +0700)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 26 Apr 2022 21:58:52 +0000 (17:58 -0400)
commit5e71b814f75abb452eee688a9fa90f9d3c76f12f
treec64b9527c68254a913e5d81bfaca7310ecd86ecf
parent8aa24b7e97dbfd3c817f84151c84b0380fc563d5
tracing: Return -EINVAL if WARN_ON(!glob) triggered in event_hist_trigger_parse()

If `WARN_ON(!glob)` is ever triggered, we will still continue executing
the next lines. This will trigger the more serious problem, a NULL
pointer dereference bug.

Just return -EINVAL if @glob is NULL.

Link: https://lkml.kernel.org/r/20220417185630.199062-2-ammarfaizi2@gnuweeb.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c