Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Hongfu Li <hongfu.li@linux.dev>
Cc: hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev,
	 shakeel.butt@linux.dev, muchun.song@linux.dev, tj@kernel.org,
	shuah@kernel.org,  akpm@linux-foundation.org,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	 linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hongfu Li <lihongfu@kylinos.cn>
Subject: Re: [PATCH] selftests/cgroup: Fix cg_run_in_subcgroups ignoring arg parameter
Date: Thu, 20 Aug 2026 11:27:20 +0200	[thread overview]
Message-ID: <aobIWjGwusjSzvBn@localhost.localdomain> (raw)
In-Reply-To: <20260820070944.31451-1-hongfu.li@linux.dev>

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

On Thu, Aug 20, 2026 at 03:09:44PM +0800, Hongfu Li <hongfu.li@linux.dev> wrote:
> From: Hongfu Li <lihongfu@kylinos.cn>
> 
> cg_run_in_subcgroups() discards its arg and always passes NULL to cg_run(),
> turning the (void *)100 from test_kmem_dead_cgroups() into NULL so no
> allocation occurs.
> 
> This makes test_kmem_dead_cgroups() falsely pass without exercising the
> "dying cgroup with charged slab" scenario it intends to test.
> 
> Pass the arg through to cg_run() to fix this.
> 
> Fixes: 933dc80ec262 ("kselftests: cgroup: add kernel memory accounting tests")
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
> ---
>  tools/testing/selftests/cgroup/test_kmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Good catch,

Reviewed-by: Michal Koutný <mkoutny@suse.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]

      reply	other threads:[~2026-08-20  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  7:09 [PATCH] selftests/cgroup: Fix cg_run_in_subcgroups ignoring arg parameter Hongfu Li
2026-08-20  9:27 ` Michal Koutný [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=aobIWjGwusjSzvBn@localhost.localdomain \
    --to=mkoutny@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=hongfu.li@linux.dev \
    --cc=lihongfu@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=tj@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