Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Attila Fazekas <afazekas@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] mmap22: Bound child memory allocation to avoid OOM
Date: Wed, 4 Nov 2026 17:32:07 +0100	[thread overview]
Message-ID: <auteByNCMzYWA5uV@yuki.lan> (raw)
In-Reply-To: <20261102105704.1577364-1-afazekas@redhat.com>

Hi!
> Assisted-by: Gemini CLI
> Signed-off-by: Attila Fazekas <afazekas@redhat.com>
> ---
>  testcases/kernel/syscalls/mmap/mmap22.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/mmap/mmap22.c b/testcases/kernel/syscalls/mmap/mmap22.c
> index 0b95c578f..16fcb6dd8 100644
> --- a/testcases/kernel/syscalls/mmap/mmap22.c
> +++ b/testcases/kernel/syscalls/mmap/mmap22.c
> @@ -26,6 +26,7 @@
>  
>  #define MEM_LIMIT (256 * TST_MB)
>  #define ALLOC_SIZE (128 * TST_MB)
> +#define CHILD_ALLOC_MAX (ALLOC_SIZE + 32 * TST_MB)
                             ^
			     Wouldn't this be better:
			     (MEM_LIMIT - ALLOC_SIZE + 32*TST_MB)

That way this would stil work if we change either MEM_LIMIT or
ALLOC_SIZE.

Otherwise the change looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-11-04 16:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 10:57 [LTP] [PATCH] mmap22: Bound child memory allocation to avoid OOM Attila Fazekas via ltp
2026-11-02 18:54 ` [LTP] " linuxtestproject.agent
2026-11-03 20:14 ` [LTP] [PATCH] " Petr Vorel
2026-11-04 16:32 ` Cyril Hrubis [this message]
2026-11-05  8:04   ` Attila Fazekas via ltp

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=auteByNCMzYWA5uV@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=afazekas@redhat.com \
    --cc=ltp@lists.linux.it \
    /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