]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
eventfs: Fix failure path in eventfs_create_events_dir()
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 6 Feb 2024 12:09:15 +0000 (07:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:19 +0000 (09:25 +0100)
commitc99e5cfe77e543216f73232cb802fa6df13b262b
tree583c787d00dea5cb4f53507cc3ea83c6ecd48639
parent17e4e4d2335caa2bb2c760a822fb66ff7ac5079e
eventfs: Fix failure path in eventfs_create_events_dir()

commit 7e8ad67c9b5c11e990c320ed7e7563f2301672a7 upstream.

The failure path of allocating ei goes to a path that dereferences ei.
Add another label that skips over the ei dereferences to do the rest of
the clean up.

Link: https://lore.kernel.org/all/70e7bace-561c-95f-1117-706c2c220bc@inria.fr/
Link: https://lore.kernel.org/linux-trace-kernel/20231019204132.6662fef0@gandalf.local.home
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode")
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/tracefs/event_inode.c