From: no-reply@sashiko.virtuozzo.com
To: khorenko@virtuozzo.com, Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v2 2/5] ms/eventfs: Fix use-after-free in eventfs_remove_rec()
Date: Thu, 12 Nov 2026 00:13:50 +0000 [thread overview]
Message-ID: <010701a1cd1a8887-41ddf26e-2ca7-4282-a5ad-692aedeb3ede-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261112000926.381308-4-eva.kurchatova@virtuozzo.com>
> From: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
>
> eventfs_remove_rec() recursively removes the child at the current loop
> position. After the recursive call returns, list_for_each_entry() advances
> by reading list.next from the removed child.
>
> If free_ei() drops the final reference, release_ei() reuses the list/rcu
> union to queue an SRCU callback. The child may be freed before that read.
> The eventfs_mutex serializes list updates, but it does not keep the removed
> child alive or prevent the SRCU callback from running.
>
> Use list_for_each_entry_safe() to save the next sibling before recursively
> removing the current child.
>
> Cc: stable@vger.kernel.org
> Fixes: 43aa6f97c2d0 ("eventfs: Get rid of dentry pointers without refcounts")
> Link: https://patch.msgid.link/20260806022719.375354-1-shuangpeng.kernel@gmail.com
> Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> (cherry picked from commit fd73b691702170d37d66f4b0278530cea8ed419a)
>
> https://virtuozzo.atlassian.net/browse/VSTOR-154529
> Feature: fix ms/tracefs
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
This patch is unchanged since "[Devel] [PATCH hci-8.1 1/4] ms/eventfs: Fix use-after-free in eventfs_remove_rec()", which Sashiko reviewed and found no issues in. That review applies to this posting unaltered, so the patch has not been reviewed again.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261111203529.363554-1-eva.kurchatova@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-12 0:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 0:07 [Devel] [PATCH hci-8.1 v2 0/5] ms/eventfs: fix kernel panic on NULL dereference Eva Kurchatova
2026-11-12 0:07 ` [Devel] [PATCH hci-8.1 v2 1/5] ms/eventfs: Hold eventfs_mutex and SRCU when remount walks events Eva Kurchatova
2026-11-12 0:15 ` no-reply
2026-11-12 16:43 ` Konstantin Khorenko
2026-11-12 0:07 ` [Devel] [PATCH hci-8.1 v2 2/5] ms/eventfs: Fix use-after-free in eventfs_remove_rec() Eva Kurchatova
2026-11-12 0:13 ` no-reply [this message]
2026-11-12 16:43 ` Konstantin Khorenko
2026-11-12 0:07 ` [Devel] [PATCH hci-8.1 v2 3/5] ms/eventfs: Use children field for rcu head and add memory barriers Eva Kurchatova
2026-11-12 0:16 ` no-reply
2026-11-12 4:18 ` Eva Kurchatova (Virtuozzo)
2026-11-12 16:43 ` Konstantin Khorenko
2026-11-12 0:07 ` [Devel] [PATCH hci-8.1 v2 4/5] ms/eventfs: fix SRCU read lock leak in eventfs_iterate() Eva Kurchatova
2026-11-12 0:15 ` no-reply
2026-11-12 16:43 ` Konstantin Khorenko
2026-11-12 0:07 ` [Devel] [PATCH hci-8.1 v2 5/5] ms/eventfs: Initialize ei->children and ei->list in init_ei() Eva Kurchatova
2026-11-12 0:16 ` no-reply
2026-11-12 16:43 ` Konstantin Khorenko
2026-11-12 16:43 ` [Devel] [PATCH hci-8.1 v2 0/5] ms/eventfs: fix kernel panic on NULL dereference Konstantin Khorenko
2026-11-12 16:50 ` Konstantin Khorenko
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=010701a1cd1a8887-41ddf26e-2ca7-4282-a5ad-692aedeb3ede-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox