]> Git Repo - linux.git/commit
eventfs: Free all of the eventfs_inode after RCU
authorSteven Rostedt (Google) <[email protected]>
Thu, 2 May 2024 20:08:22 +0000 (16:08 -0400)
committerSteven Rostedt (Google) <[email protected]>
Sat, 4 May 2024 08:25:37 +0000 (04:25 -0400)
commitee4e0379475e4fe723986ae96293e465014fa8d9
tree3ad15be7d97289d4eda263dc6db11320ece92a34
parentb63db58e2fa5d6963db9c45df88e60060f0ff35f
eventfs: Free all of the eventfs_inode after RCU

The freeing of eventfs_inode via a kfree_rcu() callback. But the content
of the eventfs_inode was being freed after the last kref. This is
dangerous, as changes are being made that can access the content of an
eventfs_inode from an RCU loop.

Instead of using kfree_rcu() use call_rcu() that calls a function to do
all the freeing of the eventfs_inode after a RCU grace period has expired.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Andrew Morton <[email protected]>
Fixes: 43aa6f97c2d03 ("eventfs: Get rid of dentry pointers without refcounts")
Signed-off-by: Steven Rostedt (Google) <[email protected]>
fs/tracefs/event_inode.c
This page took 0.051803 seconds and 4 git commands to generate.