mm/slub: add a dump_stack() to the unexpected GFP check
authorBorislav Petkov <bp@suse.de>
Wed, 22 Feb 2017 23:41:02 +0000 (15:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 23 Feb 2017 00:41:27 +0000 (16:41 -0800)
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 <bp@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c

index 7ec0a965c6a3a366550b2500f9880f65e5025138..1e5ef312f146201c4ddf4fff572ce78442d1bc2e 100644 (file)
--- 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,