From: linuxtestproject.agent@gmail.com
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] mremap07.c: New test for mremap() with MREMAP_DONTUNMAP
Date: Fri, 17 Apr 2026 07:55:38 +0000 [thread overview]
Message-ID: <20260417075538.3930-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260417065332.23663-1-wegao@suse.com>
Hi Wei,
On 2026-04-17, Wei Gao wrote:
> mremap07.c: New test for mremap() with MREMAP_DONTUNMAP
> Fixes: https://github.com/linux-test-project/ltp/issues/1168
Use Closes: for GitHub issue references. Fixes: is reserved for commit
SHA references in the form: Fixes: <hash> ("<subject>").
[...]
> +static void cleanup(void)
> +{
> + if (new_remap_addr && new_remap_addr != MAP_FAILED)
> + SAFE_MUNMAP(new_remap_addr, page_size);
> +
> + if (fault_addr && fault_addr != MAP_FAILED)
> + SAFE_MUNMAP(fault_addr, page_size);
> +
> + if (uffd != -1)
> + SAFE_CLOSE(uffd);
> +}
SAFE_MUNMAP does not clear the pointer. If setup() fails on a subsequent
iteration before SAFE_MMAP reassigns fault_addr, cleanup() will
double-munmap the stale pointer. Add fault_addr = NULL; after the
SAFE_MUNMAP call.
---
Note:
Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/24554018117
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-04-17 7:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 23:02 [LTP] [PATCH v1] mremap07.c: New case check mremap with MREMAP_DONTUNMAP Wei Gao via ltp
2025-10-15 3:15 ` [LTP] [PATCH v2] " Wei Gao via ltp
2025-10-16 13:32 ` Petr Vorel
2025-10-17 7:51 ` Wei Gao via ltp
2025-10-30 19:39 ` Petr Vorel
2025-11-01 8:47 ` Wei Gao via ltp
2025-10-30 5:40 ` [LTP] [PATCH v3] " Wei Gao via ltp
2025-10-30 20:07 ` Petr Vorel
2026-02-25 9:05 ` [LTP] [PATCH v4] " Wei Gao via ltp
2026-03-23 7:03 ` Andrea Cervesato via ltp
2026-03-25 1:15 ` [LTP] [PATCH v5] " Wei Gao via ltp
2026-03-26 10:01 ` Andrea Cervesato via ltp
2026-04-10 2:31 ` [LTP] [PATCH v6] " Wei Gao via ltp
2026-04-17 6:53 ` [LTP] [PATCH v7] mremap07.c: New test for mremap() " Wei Gao via ltp
2026-04-17 7:55 ` linuxtestproject.agent [this message]
2026-04-17 8:00 ` [LTP] " Andrea Cervesato via ltp
2026-04-17 12:27 ` [LTP] [PATCH v8] " Wei Gao via ltp
2026-04-17 13:26 ` [LTP] " linuxtestproject.agent
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=20260417075538.3930-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.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