From: no-reply@sashiko.virtuozzo.com
To: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>,
vasileios.almpanis@virtuozzo.com, ptikhomirov@virtuozzo.com,
Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v7 5/6] ovl: Fix leaking fd references in ovl_copyfile
Date: Mon, 16 Nov 2026 17:27:19 +0000 [thread overview]
Message-ID: <010701a1e56626d6-9085a217-04a3-4e0c-b612-dd17499d6aa0-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261116-ovl-use-orig-ve-v7-5-37daa56081ed@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] ovl: commit message does not name the leaking path and is
self-contradictory
- [Low] ovl: missing Fixes: trailer for leak introduced by RHEL10 import
--
commit 215d5a0fc1123478f6827cb33f029a276b1b9cc1
Author: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
ovl: Fix leaking fd references in ovl_copyfile
This commit changes the cross-superblock rw_verify_area() failure path in ovl_copyfile() to jump to a new out_put_real label. The new label calls fdput() on real_in and real_out before the inode is unlocked.
> ovl: Fix leaking fd references in ovl_copyfile
>
> Latest rebase onto kernel-6.12.0-211.75.1.el10 introduced a leak.
> We lack of ovl_real_file, added in d66907b[1], which changed
> logic so we need no fdput anymore.
>
> Imported commit a1e0eb8[2] didn't bother with fdput cleanup,
> because it relied on d66907b existence. We still need to
> perform cleanup and put fds.
>
> [1]: https://github.com/torvalds/linux/commit/d66907b51ba0
> [2]: https://github.com/torvalds/linux/commit/a1e0eb8f55cf
>
> https://virtuozzo.atlassian.net/browse/VSTOR-142405
> Signed-off-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
[Severity: Low]
Could the message say which path leaked? It says a missing ovl_real_file
means "we need no fdput anymore", yet the patch adds an fdput() on a path
that had none, so the text contradicts the change.
The only leaking path was the cross-superblock rw_verify_area() failure in
ovl_copyfile(). It did goto out_unlock and skipped fdput() on both real_in
and real_out. The success path already put both. When FDPUT_FPUT is set,
this leaks a struct file reference per failed call. Naming that path and
effect would make the message accurate.
[Severity: Low]
This is a bug fix, and the message says the rebase onto
kernel-6.12.0-211.75.1.el10 introduced the leak. Should it carry a Fixes:
trailer for that import?
Fixes: d5a10d38e534 ("rh10: import RHEL10 kernel-6.12.0-211.75.1.el10")
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261116-ovl-use-orig-ve-v7-0-37daa56081ed@virtuozzo.com?part=5
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-16 17:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 17:18 [Devel] [PATCH hci-8.1 v7 0/6] Fix kernel crash in overlayfs Vladimir Riabchun
2026-11-16 17:18 ` [Devel] [PATCH hci-8.1 v7 1/6] ve: Remove STOPPED state Vladimir Riabchun
2026-11-16 17:23 ` no-reply
2026-11-16 17:35 ` Vladimir Riabchun
2026-11-16 17:18 ` [Devel] [PATCH hci-8.1 v7 2/6] ve: Introduce override_ve/revert_ve helpers Vladimir Riabchun
2026-11-16 17:25 ` no-reply
2026-11-16 17:18 ` [Devel] [PATCH hci-8.1 v7 3/6] ve: Defer ve creds drop until ve is completely destroyed Vladimir Riabchun
2026-11-16 17:26 ` no-reply
2026-11-16 17:18 ` [Devel] [PATCH hci-8.1 v7 4/6] ovl: Keep creator VE in overlayfs superblock Vladimir Riabchun
2026-11-16 17:27 ` no-reply
2026-11-16 17:18 ` [Devel] [PATCH hci-8.1 v7 5/6] ovl: Fix leaking fd references in ovl_copyfile Vladimir Riabchun
2026-11-16 17:27 ` no-reply [this message]
2026-11-16 17:18 ` [Devel] [PATCH hci-8.1 v7 6/6] ve/overlayfs: Override VE together with creds Vladimir Riabchun
2026-11-16 17:32 ` no-reply
2026-11-16 17:45 ` Vladimir Riabchun
2026-11-16 17:43 ` [Devel] [PATCH hci-8.1 v7 0/6] Fix kernel crash in overlayfs Konstantin Khorenko
2026-11-16 20:22 ` Vladimir Riabchun
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=010701a1e56626d6-9085a217-04a3-4e0c-b612-dd17499d6aa0-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=ptikhomirov@virtuozzo.com \
--cc=vasileios.almpanis@virtuozzo.com \
--cc=vladimir.riabchun@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