From: no-reply@sashiko.virtuozzo.com
To: devel@openvz.org, Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: Re: [Devel] [PATCH vz10 v2] fs/kernfs, ve: pin the VE that created a kernfs instance
Date: Tue, 29 Sep 2026 16:54:50 +0000 [thread overview]
Message-ID: <010701a0ee1728f9-f1fb77d7-9c07-419d-86fe-967eaf94586f-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20260929-prep-kh-vstor-142552-kernfs-pin-ve-v2-1-0795e3aee679@virtuozzo.com>
> kernfs_get_tree() stores a bare get_exec_env() pointer in
> kernfs_super_info, and since commit 8d1abf587552 ("fs/kernfs, ve:
> hide entries from a VE without invalidating the dentry")
> kernfs_dop_revalidate() compares it against the caller's VE to decide
> between dropping the dentry and answering -ENOENT.
>
> Nothing backs that pointer with a reference: if the mount is pinned from
> outside - the host bind-mounted a Container's sysfs, or holds an fd
> inside it - the superblock outlives the Container, info->ve dangles, and
> a later Container whose ve_struct is allocated at the same address is
> mistaken for the creator of the instance. Its lookups then take the
> d_invalidate() path on the dead instance and detach the mounts placed on
> top of it.
>
> Take a css reference on the VE for the lifetime of the superblock, so
> [ ... ]
> Fixes: 8d1abf587552 ("fs/kernfs, ve: hide entries from a VE without invalidating the dentry")
> https://virtuozzo.atlassian.net/browse/VSTOR-142552
>
> Feature: kernfs: per-CT entries visibility and permissions configuration
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260929-prep-kh-vstor-142552-kernfs-pin-ve-v2-1-0795e3aee679@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-09-29 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 16:49 Konstantin Khorenko
2026-09-29 16:51 ` Konstantin Khorenko
2026-09-29 16:54 ` no-reply [this message]
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=010701a0ee1728f9-f1fb77d7-9c07-419d-86fe-967eaf94586f-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.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.