lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240426200941.GP2118490@ZenIV>
Date: Fri, 26 Apr 2024 21:09:41 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Lucas Karpinski <lkarpins@...hat.com>
Cc: brauner@...nel.org, jack@...e.cz, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, alexl@...hat.com, echanude@...hat.com,
	ikent@...hat.com
Subject: Re: [RFC v2 1/1] fs/namespace: defer RCU sync for MNT_DETACH umount

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ