mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Aveline Noir <jm5905938@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
	Christian Brauner <brauner@kernel.org>,
	Muhammad Usama Anjum <usama.anjum@arm.com>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: mrelease_test: fix retry limit
Date: Thu, 1 Oct 2026 11:47:01 +0200	[thread overview]
Message-ID: <9a6a1c15-89aa-4504-8585-0f7861c3377b@kernel.org> (raw)
In-Reply-To: <CANOyQmFzsssM_BXHUDrV+UuVD5SZMBmSkg3UQnmw9Ns1PV7GCQ@mail.gmail.com>

On 10/1/26 08:00, Aveline Noir wrote:
> mrelease_test doubles the child allocation when process_mrelease()
> returns ESRCH.
> 
> When size is already MAX_SIZE_MB, the current <= check still allows
> another retry, causing the allocation to grow from 1024 MB to 2048 MB.
> 
> Use < instead of <= so the largest allocation attempted remains
> MAX_SIZE_MB.
> 
> LLM used in discovering bug. Changes were made and reviewed manually.
> 
> Fixes: 33776141b812 ("selftests: vm: add process_mrelease tests")
> Assisted-by: LLM
> Signed-off-by: Aveline Noir <jm5905938@gmail.com>
> ---
>  tools/testing/selftests/mm/mrelease_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/mrelease_test.c
> b/tools/testing/selftests/mm/mrelease_test.c
> index 64e8d00ae944..a5124c9e9f43 100644
> --- a/tools/testing/selftests/mm/mrelease_test.c
> +++ b/tools/testing/selftests/mm/mrelease_test.c
> @@ -157,7 +157,7 @@ int main(void)
>  		 * Retry until we succeed or reach MAX_SIZE_MB.
>  		 */
>  		if (errno == ESRCH) {
> -			retry = (size <= MAX_SIZE_MB);
> +			retry = (size < MAX_SIZE_MB);
>  		} else {
>  			waitpid(pid, NULL, 0);
>  			ksft_exit_fail_msg("process_mrelease: %s\n", strerror(errno));

Makes sense

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

-- 
Cheers,

David

  reply	other threads:[~2026-10-01  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01  6:00 Aveline Noir
2026-10-01  9:47 ` David Hildenbrand (Arm) [this message]
2026-10-01 11:06   ` Lorenzo Stoakes (ARM)
2026-10-02 18:55 ` SJ Park

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=9a6a1c15-89aa-4504-8585-0f7861c3377b@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=jm5905938@gmail.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=usama.anjum@arm.com \
    --cc=vbabka@kernel.org \
    /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

all inboxes | Powered by JetHome®