Skip to content
Commit 3a1dd56e authored by Steven Rostedt (Google)'s avatar Steven Rostedt (Google) Committed by Greg Kroah-Hartman
Browse files

tracefs: Set the group ownership in apply_options() not parse_options()

commit 851e99eb upstream.

Al Viro brought it to my attention that the dentries may not be filled
when the parse_options() is called, causing the call to set_gid() to
possibly crash. It should only be called if parse_options() succeeds
totally anyway.

He suggested the logical place to do the update is in apply_options().

Link: https://lore.kernel.org/all/20220225165219.737025658@goodmis.org/
Link: https://lkml.kernel.org/r/20220225153426.1c4cab6b@gandalf.local.home



Cc: stable@vger.kernel.org
Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Fixes: 48b27b6b

 ("tracefs: Set all files to the same group ownership as the mount option")
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bfa8ffba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment