Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: longlong yan <yanlonglong@kylinos.cn>
Cc: SJ Park <sj@kernel.org>,
	shuah@kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	damon@lists.linux.dev
Subject: Re: [PATCH] selftests/damon: Add missing NULL checks after malloc()
Date: Mon, 20 Jul 2026 21:31:38 -0700	[thread overview]
Message-ID: <20260721043139.151887-1-sj@kernel.org> (raw)
In-Reply-To: <20260721025802.298-1-yanlonglong@kylinos.cn>

Cc-ing DAMON mailing list.  Please Cc DAMON mailing list for DAMON patches.

Hello longlong,

On Tue, 21 Jul 2026 10:58:02 +0800 longlong yan <yanlonglong@kylinos.cn> wrote:

> Add NULL checks after each malloc() call, printing an error message
> to stderr and returning -1 on failure.

Thank you for this patch!

Could you please elaborate why this change is needed, though?  What is the user
impacting issue that this patch is fixing?  Is this fixing a false positive or
negative test results?  Or, just making the allocation failure easier to find?

> 
> Fixes: b5906f5f7359 ("selftests/damon: add a test for update_schemes_tried_regions sysfs command")
> Fixes: c94df805c774 ("selftests/damon: implement a program for even-numbered memory regions access")

If this patch is only making the allocation failure easier to detect, I think
it is an improvement rather than a fix.  If that's the case, I think we don't
need above Fixes: tags.

If this is a real bug fix, maybe it deserves stable@ porting.  Please separate
this into two patches for each bug and Cc stable@ for easy stable@ porting.


Thanks,
SJ

[...]


  reply	other threads:[~2026-07-21  4:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  2:58 [PATCH] selftests/damon: Add missing NULL checks after malloc() longlong yan
2026-07-21  4:31 ` SJ Park [this message]
2026-07-21  6:05   ` [PATCH v2] " longlong yan
2026-07-21  6:41     ` 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=20260721043139.151887-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    --cc=yanlonglong@kylinos.cn \
    /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