From: Borislav Petkov Date: Wed, 22 Feb 2017 23:41:02 +0000 (-0800) Subject: mm/slub: add a dump_stack() to the unexpected GFP check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65b9de75253e909e35d8f5c42357e632fdca5d7f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm/slub: add a dump_stack() to the unexpected GFP check We wish to know who is doing such a thing. slab.c does this. Link: http://lkml.kernel.org/r/20170116091643.15260-1-bp@alien8.de Signed-off-by: Borislav Petkov Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slub.c b/mm/slub.c index 7ec0a965c6a3..1e5ef312f146 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1630,6 +1630,7 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) flags &= ~GFP_SLAB_BUG_MASK; pr_warn("Unexpected gfp: %#x (%pGg). Fixing up to gfp: %#x (%pGg). Fix your code!\n", invalid_mask, &invalid_mask, flags, &flags); + dump_stack(); } return allocate_slab(s,