summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuopeng Zhang <zhangguopeng@kylinos.cn>2026-07-13 16:55:20 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-08-06 18:56:54 -0700
commit466dd08cdc93a35e5ac1b5485308d3134a7d308b (patch)
tree5e0107a8f2ce11d85a8cf8288d8c42265e4d044c
parent72f522bbf473f03a77e83547b677dc1505c5d41a (diff)
downloadlinux-466dd08cdc93a35e5ac1b5485308d3134a7d308b.tar.gz
linux-466dd08cdc93a35e5ac1b5485308d3134a7d308b.zip
mm: memcg-v1: account vmpressure event allocations
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. Link: https://lore.kernel.org/20260713085520.2953121-1-guopeng.zhang@linux.dev Fixes: 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control") Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Acked-by: Tao Cui <cuitao@kylinos.cn> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Muchun Song <muchun.song@linux.dev> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> Cc: Michal Hocko <mhocko@kernel.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/memcontrol-v1.c2
1 files changed, 1 insertions, 1 deletions
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;