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

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Nov 12 03:15:26 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>

This patch is unchanged since "[Devel] [PATCH hci-8.1 3/4] ms/eventfs: fix SRCU read lock leak in eventfs_iterate()", which Sashiko reviewed and found no issues in. That review applies to this posting unaltered, so the patch has not been reviewed again.

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




More information about the Devel mailing list