mm/slub: add a dump_stack() to the unexpected GFP check
authorBorislav Petkov <[email protected]>
Wed, 22 Feb 2017 23:41:02 +0000 (15:41 -0800)
committerLinus Torvalds <[email protected]>
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/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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,