tracing: dynevent: Add a missing lockdown check on dynevent

Since dynamic_events interface on tracefs is compatible with
kprobe_events and uprobe_events, it should also check the lockdown
status and reject if it is set.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/175824455687.45175.3734166065458520748.stgit@devnote2
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by Masami Hiramatsu (Google) and committed by Steven Rostedt (Google) 1da3f145 a2501032

Changed files
+4
kernel
+4
kernel/trace/trace_dynevent.c
··· 230 230 { 231 231 int ret; 232 232 233 + ret = security_locked_down(LOCKDOWN_TRACEFS); 234 + if (ret) 235 + return ret; 236 + 233 237 ret = tracing_check_open_get_tr(NULL); 234 238 if (ret) 235 239 return ret;