From: Al Viro <viro@zeniv.linux.org.uk>
To: Lucas Karpinski <lkarpins@redhat.com>
Cc: brauner@kernel.org, jack@suse.cz, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, alexl@redhat.com,
echanude@redhat.com, ikent@redhat.com
Subject: Re: [RFC v2 1/1] fs/namespace: defer RCU sync for MNT_DETACH umount
Date: Fri, 26 Apr 2024 21:09:41 +0100 [thread overview]
Message-ID: <20240426200941.GP2118490@ZenIV> (raw)
In-Reply-To: <20240426195429.28547-2-lkarpins@redhat.com>
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.
next prev parent reply other threads:[~2024-04-26 20:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 19:53 [RFC v2 0/1] fs/namespace: defer RCU sync for MNT_DETACH umount Lucas Karpinski
2024-04-26 19:53 ` [RFC v2 1/1] " Lucas Karpinski
2024-04-26 20:09 ` Al Viro [this message]
2024-04-30 13:25 ` Lucas Karpinski
2024-05-01 13:41 ` Ian Kent
2024-04-30 14:14 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240426200941.GP2118490@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=alexl@redhat.com \
--cc=brauner@kernel.org \
--cc=echanude@redhat.com \
--cc=ikent@redhat.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkarpins@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.