From: sashiko-bot@kernel.org
To: zhangchujun <zhangchujun@cmss.chinamobile.com>,
hughd@google.com, david@kernel.org
Cc: akpm@linux-foundation.org, baolin.wang@linux.alibaba.com,
shuah@kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] selftests/memfd: close fd in sysctl helpers
Date: Sat, 14 Nov 2026 07:13:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-214241@kernel.org> (raw)
In-Reply-To: <20261113071306.1673-1-zhangchujun@cmss.chinamobile.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] selftests/memfd: Signed-off-by trailer uses handle instead of
real name
- [Low] selftests/memfd: missing Fixes trailers for sysctl helper fd
leaks
--
commit f7c1cc7489dcee54b6a1302dc52c7e84f82859e6
Author: zhangchujun <zhangchujun@cmss.chinamobile.com>
> selftests/memfd: close fd in sysctl helpers
>
> The three sysctl helpers sysctl_assert_write(), sysctl_fail_write()
> and sysctl_assert_equal() open /proc/sys/vm/memfd_noexec but never
> close the descriptor, leaking one fd on every call. The noexec tests
> call these helpers in a loop, so the test can run out of file
> descriptors on a system with a low limit.
>
> Close the fd before returning from each helper.
>
> Signed-off-by: zhangchujun <zhangchujun@cmss.chinamobile.com>
[Severity: High]
Per Documentation/process/submitting-patches.rst, the Signed-off-by trailer
and commit Author field must use a real human name rather than a single-word
account handle or username ("zhangchujun").
[Severity: Low]
Since this fixes file descriptor leaks introduced in sysctl_assert_write(),
sysctl_fail_write(), and sysctl_assert_equal(), should the commit message
include Fixes tags for the commits that added those helpers?
Fixes: 11f75a01448f ("selftests/memfd: add tests for MFD_NOEXEC_SEAL MFD_EXEC")
Fixes: 6469b66e3f5a ("selftests: improve vm.memfd_noexec sysctl tests")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113071306.1673-1-zhangchujun@cmss.chinamobile.com?part=1
prev parent reply other threads:[~2026-11-14 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 7:13 [PATCH] selftests/memfd: close fd in sysctl helpers zhangchujun
2026-11-14 7:13 ` sashiko-bot [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=sashiko-outbox-214241@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shuah@kernel.org \
--cc=zhangchujun@cmss.chinamobile.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.