[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559656836-24940-1-git-send-email-cai@lca.pw>
Date: Tue, 4 Jun 2019 10:00:36 -0400
From: Qian Cai <cai@....pw>
To: akpm@...ux-foundation.org
Cc: rppt@...ux.ibm.com, will.deacon@....com, catalin.marinas@....com,
linux-arm-kernel@...ts.infradead.org, hannes@...xchg.org,
mhocko@...nel.org, vdavydov.dev@...il.com, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Qian Cai <cai@....pw>
Subject: [PATCH -next] arm64/mm: fix a bogus GFP flag in pgd_alloc()
The commit "arm64: switch to generic version of pte allocation"
introduced endless failures during boot like,
kobject_add_internal failed for pgd_cache(285:chronyd.service) (error:
-2 parent: cgroup)
It turns out __GFP_ACCOUNT is passed to kernel page table allocations
and then later memcg finds out those don't belong to any cgroup.
backtrace:
kobject_add_internal
kobject_init_and_add
sysfs_slab_add+0x1a8
__kmem_cache_create
create_cache
memcg_create_kmem_cache
memcg_kmem_cache_create_func
process_one_work
worker_thread
kthread
Signed-off-by: Qian Cai <cai@....pw>
---
arch/arm64/mm/pgd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/pgd.c b/arch/arm64/mm/pgd.c
index 769516cb6677..53c48f5c8765 100644
--- a/arch/arm64/mm/pgd.c
+++ b/arch/arm64/mm/pgd.c
@@ -38,7 +38,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
if (PGD_SIZE == PAGE_SIZE)
return (pgd_t *)__get_free_page(gfp);
else
- return kmem_cache_alloc(pgd_cache, gfp);
+ return kmem_cache_alloc(pgd_cache, GFP_PGTABLE_KERNEL);
}
void pgd_free(struct mm_struct *mm, pgd_t *pgd)
--
1.8.3.1
Powered by blists - more mailing lists