The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] mm: memcg-v1: account vmpressure event allocations
@ 2026-07-13  8:55 Guopeng Zhang
  2026-07-13 10:26 ` Tao Cui
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guopeng Zhang @ 2026-07-13  8:55 UTC (permalink / raw)
  To: Andrew Morton, Roman Gushchin, Shakeel Butt, Stanislav Fort
  Cc: Johannes Weiner, Michal Hocko, Muchun Song, cgroups, linux-mm,
	linux-kernel, stable, Guopeng Zhang

From: Guopeng Zhang <zhangguopeng@kylinos.cn>

Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop
world-writable cgroup.event_control") accounted cgroup v1 event
registration allocations with GFP_KERNEL_ACCOUNT, but missed struct
vmpressure_event.

Use GFP_KERNEL_ACCOUNT for this allocation as well.

Fixes: 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
---
 mm/memcontrol-v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
index e8b6e1560278..f8424ec3734b 100644
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -1721,7 +1721,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
 		mode = ret;
 	}
 
-	ev = kzalloc_obj(*ev);
+	ev = kzalloc_obj(*ev, GFP_KERNEL_ACCOUNT);
 	if (!ev) {
 		ret = -ENOMEM;
 		goto out;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: memcg-v1: account vmpressure event allocations
  2026-07-13  8:55 [PATCH] mm: memcg-v1: account vmpressure event allocations Guopeng Zhang
@ 2026-07-13 10:26 ` Tao Cui
  2026-07-13 11:39 ` Johannes Weiner
  2026-07-13 12:30 ` Muchun Song
  2 siblings, 0 replies; 4+ messages in thread
From: Tao Cui @ 2026-07-13 10:26 UTC (permalink / raw)
  To: Guopeng Zhang, Andrew Morton, Roman Gushchin, Shakeel Butt,
	Stanislav Fort
  Cc: cui.tao, Johannes Weiner, Michal Hocko, Muchun Song, cgroups,
	linux-mm, linux-kernel, stable, Guopeng Zhang



在 2026/7/13 16:55, Guopeng Zhang 写道:
> From: Guopeng Zhang <zhangguopeng@kylinos.cn>
> 
> Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop
> world-writable cgroup.event_control") accounted cgroup v1 event
> registration allocations with GFP_KERNEL_ACCOUNT, but missed struct
> vmpressure_event.
> 
> Use GFP_KERNEL_ACCOUNT for this allocation as well.
> 
> Fixes: 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
> Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
> ---
>  mm/memcontrol-v1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
> index e8b6e1560278..f8424ec3734b 100644
> --- a/mm/memcontrol-v1.c
> +++ b/mm/memcontrol-v1.c
> @@ -1721,7 +1721,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  		mode = ret;
>  	}
>  
> -	ev = kzalloc_obj(*ev);
> +	ev = kzalloc_obj(*ev, GFP_KERNEL_ACCOUNT);
>  	if (!ev) {
>  		ret = -ENOMEM;
>  		goto out;
Acked-by: Tao Cui <cuitao@kylinos.cn>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: memcg-v1: account vmpressure event allocations
  2026-07-13  8:55 [PATCH] mm: memcg-v1: account vmpressure event allocations Guopeng Zhang
  2026-07-13 10:26 ` Tao Cui
@ 2026-07-13 11:39 ` Johannes Weiner
  2026-07-13 12:30 ` Muchun Song
  2 siblings, 0 replies; 4+ messages in thread
From: Johannes Weiner @ 2026-07-13 11:39 UTC (permalink / raw)
  To: Guopeng Zhang
  Cc: Andrew Morton, Roman Gushchin, Shakeel Butt, Stanislav Fort,
	Michal Hocko, Muchun Song, cgroups, linux-mm, linux-kernel,
	stable, Guopeng Zhang

On Mon, Jul 13, 2026 at 04:55:20PM +0800, Guopeng Zhang wrote:
> From: Guopeng Zhang <zhangguopeng@kylinos.cn>
> 
> Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop
> world-writable cgroup.event_control") accounted cgroup v1 event
> registration allocations with GFP_KERNEL_ACCOUNT, but missed struct
> vmpressure_event.
> 
> Use GFP_KERNEL_ACCOUNT for this allocation as well.
> 
> Fixes: 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
> Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>

I guess :)

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: memcg-v1: account vmpressure event allocations
  2026-07-13  8:55 [PATCH] mm: memcg-v1: account vmpressure event allocations Guopeng Zhang
  2026-07-13 10:26 ` Tao Cui
  2026-07-13 11:39 ` Johannes Weiner
@ 2026-07-13 12:30 ` Muchun Song
  2 siblings, 0 replies; 4+ messages in thread
From: Muchun Song @ 2026-07-13 12:30 UTC (permalink / raw)
  To: Guopeng Zhang
  Cc: Andrew Morton, Roman Gushchin, Shakeel Butt, Stanislav Fort,
	Johannes Weiner, Michal Hocko, cgroups, linux-mm, linux-kernel,
	stable, Guopeng Zhang



> On Jul 13, 2026, at 16:55, Guopeng Zhang <guopeng.zhang@linux.dev> wrote:
> 
> From: Guopeng Zhang <zhangguopeng@kylinos.cn>
> 
> Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop
> world-writable cgroup.event_control") accounted cgroup v1 event
> registration allocations with GFP_KERNEL_ACCOUNT, but missed struct
> vmpressure_event.
> 
> Use GFP_KERNEL_ACCOUNT for this allocation as well.
> 
> Fixes: 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
> Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>

Reviewed-by: Muchun Song <muchun.song@linux.dev>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-13 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13  8:55 [PATCH] mm: memcg-v1: account vmpressure event allocations Guopeng Zhang
2026-07-13 10:26 ` Tao Cui
2026-07-13 11:39 ` Johannes Weiner
2026-07-13 12:30 ` Muchun Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox