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 <[email protected]>

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 <[email protected]>

[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/[email protected]?part=5

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to