Re: [PATCH] mm: memcg-v1: account vmpressure event allocations
Tao Cui <[email protected]>
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kernel.vger.stable,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
在 2026/7/13 16:55, Guopeng Zhang 写道: > From: Guopeng Zhang <[email protected]> > > 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 <[email protected]> > --- > 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 <[email protected]>