]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracefs: fix a leak in eventfs_create_events_dir()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 Oct 2025 22:13:48 +0000 (18:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:02 +0000 (14:03 +0100)
commitbc2b1bbc0329900b97034b6ad3728111fb4f4f01
tree43c238f47f5b1d307b9cabe80e9439ba4b2da6b6
parent30db8309b703a80b0e6afca1d0797635c96c5a87
tracefs: fix a leak in eventfs_create_events_dir()

[ Upstream commit 798a401660a151633cb171738a72a8f1efb9b0b4 ]

If we have LOCKDOWN_TRACEFS, the function bails out - *after*
having locked the parent directory and without bothering to
undo that.  Just check it before tracefs_start_creating()...

Fixes: e24709454c45 "tracefs/eventfs: Add missing lockdown checks"
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/tracefs/event_inode.c