Re: [PATCH 11/52] check_for_nsfs_mounts(): no need to take locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 25, 2025 at 05:43:14AM +0100, Al Viro wrote:
> Currently we are taking mount_writer; what that function needs is
> either mount_locked_reader (we are not changing anything, we just
> want to iterate through the subtree) or namespace_shared and
> a reference held by caller on the root of subtree - that's also
> enough to stabilize the topology.
> 
> The thing is, all callers are already holding at least namespace_shared
> as well as a reference to the root of subtree.
> 
> Let's make the callers provide locking warranties - don't mess with
> mount_lock in check_for_nsfs_mounts() itself and document the locking
> requirements.
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux