Commit 456c32e3 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google)
Browse files

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.

Link: https://lore.kernel.org/all/175824455687.45175.3734166065458520748.stgit@devnote2/



Fixes: 17911ff3 ("tracing: Add locked_down checks to the open calls of files created for tracefs")
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
parent c539feff
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -230,6 +230,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
{
	int ret;

	ret = security_locked_down(LOCKDOWN_TRACEFS);
	if (ret)
		return ret;

	ret = tracing_check_open_get_tr(NULL);
	if (ret)
		return ret;