[Devel] [PATCH hci-8.1 3/4] ms/eventfs: fix SRCU read lock leak in eventfs_iterate()

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 11 23:39:34 MSK 2026


> From: Joseph Qi <joseph.qi at linux.alibaba.com>
> 
> Commit 1b95382da85c ("eventfs: Use children field for rcu head and add
> memory barriers") added an early bail out to the ei->children loop:
> 
> 	smp_rmb();
> 	if (ei->is_freed)
> 		return -EINVAL;
> 
> Upstream wraps eventfs_iterate() in guard(srcu)(&eventfs_srcu), so that
> return still drops the read lock. The 6.12.y backport instead brackets the
> function with srcu_read_lock() and a shared "out" label that calls
> srcu_read_unlock(), so this path returns while still holding eventfs_srcu
> for reading.
> 
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-154529
> Feature: fix ms/tracefs
> 
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

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




More information about the Devel mailing list