[PATCH bpf-next 1/4] kernfs: Add __kernfs_xattr_get for RCU protected access

Tejun Heo tj at kernel.org
Sat Jun 21 02:38:01 UTC 2025


On Thu, Jun 19, 2025 at 12:01:19PM +0200, Christian Brauner wrote:
> From bdc53435a1cd5c456dc28d8239eff0e7fa4e8dda Mon Sep 17 00:00:00 2001
> From: Christian Brauner <brauner at kernel.org>
> Date: Thu, 19 Jun 2025 11:50:26 +0200
> Subject: [PATCH] kernfs: remove iattr_mutex
> 
> All allocations of struct kernfs_iattrs are serialized through a global
> mutex. Simply do a racy allocation and let the first one win. I bet most
> callers are under inode->i_rwsem anyway and it wouldn't be needed but
> let's not require that.
> 
> Signed-off-by: Christian Brauner <brauner at kernel.org>

Acked-by: Tejun Heo <tj at kernel.org>

Thanks.

-- 
tejun



More information about the Linux-security-module-archive mailing list