mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
mm: memcg-v1: account vmpressure event allocations
Commit72797d218b("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:72797d218b("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>
This commit is contained in:
committed by
Andrew Morton
parent
72f522bbf4
commit
466dd08cdc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user