Message ID | 20240904131605.640d42b1@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | d2603279c7d645bf0d11fa253b23f1ab48fc8d3c |
Headers | show |
Series | eventfs: Use list_del_rcu() for SRCU protected list variable | expand |
On Wed, 4 Sep 2024 13:16:05 -0400 Steven Rostedt <rostedt@goodmis.org> wrote: > This is simply fixed by using list_del_rcu() that is specifically made for > this purpose. > I forgot to add: Link: https://lore.kernel.org/linux-trace-kernel/20240829085025.3600021-1-chizhiling@163.com/ I'll add it when I apply it. -- Steve > Cc: stable@vger.kernel.org > Fixes: 43aa6f97c2d03 ("eventfs: Get rid of dentry pointers without refcounts") > Reported-by: Chi Zhiling <chizhiling@kylinos.cn> > Tested-by: Chi Zhiling <chizhiling@kylinos.cn> > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> > ---
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 01e99e98457d..8705c77a9e75 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -862,7 +862,7 @@ static void eventfs_remove_rec(struct eventfs_inode *ei, int level) list_for_each_entry(ei_child, &ei->children, list) eventfs_remove_rec(ei_child, level + 1); - list_del(&ei->list); + list_del_rcu(&ei->list); free_ei(ei); }