[Devel] [PATCH hci-8.1 2/2] ms/eventfs: Free the eventfs_inode after an rcu grace period too

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Mon Nov 16 17:45:31 MSK 2026


> From: Christian Brauner <brauner at kernel.org>
> 
> commit 2cd88c498ecff8e22bf4c397b8eb226db70ac343 upstream.
> 
> tracefs_d_revalidate() reads ->is_freed of the eventfs_inode that
> dentry->d_fsdata points to, and ->d_revalidate() is called in rcu
> pathwalk mode with nothing but rcu_read_lock() held. The dentry itself
> stays around for such a walker, but tracefs_d_release() drops its
> reference to the eventfs_inode when the dentry is killed, and
> release_ei() then frees it after a grace period of eventfs_srcu. An
> SRCU grace period doesn't wait for rcu_read_lock() sections, so the
> walker can read an eventfs_inode that is already gone.
> 
> With a pathwalk held up in tracefs_d_revalidate() while the dentry goes
> away:
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-154849
> Feature: fix ms/tracefs
> 
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261116144143.624802-1-eva.kurchatova@virtuozzo.com?part=2




More information about the Devel mailing list