Re: [RFC v2 1/1] fs/namespace: defer RCU sync for MNT_DETACH umount

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

 



On Fri, Apr 26, 2024 at 03:53:48PM -0400, Lucas Karpinski wrote:

> -static void namespace_unlock(void)
> +static void free_mounts(struct hlist_head *mount_list)
>  {
> -	struct hlist_head head;
>  	struct hlist_node *p;
>  	struct mount *m;
> +
> +	hlist_for_each_entry_safe(m, p, mount_list, mnt_umount) {
> +		hlist_del(&m->mnt_umount);
> +		mntput(&m->mnt);

... which may block in quite a few ways.

> +	}
> +}
> +
> +static void delayed_mount_release(struct rcu_head *head)
> +{
> +	struct mount_delayed_release *drelease =
> +		container_of(head, struct mount_delayed_release, rcu);
> +
> +	free_mounts(&drelease->release_list);

... and therefore so can this.

> +	kfree(drelease);
> +}


> +		call_rcu(&drelease->rcu, delayed_mount_release);

... which is a bad idea, since call_rcu() callbacks are run
from interrupt context.  Which makes blocking in them a problem.




[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