From bacdcb346093794f292c2c9c67ae350895e8b7ef Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Tue, 26 Jul 2016 15:22:02 -0700 Subject: slab: make GFP_SLAB_BUG_MASK information more human readable printk offers %pGg for quite some time so let's use it to get a human readable list of invalid flags. The original output would be [ 429.191962] gfp: 2 after the change [ 429.191962] Unexpected gfp: 0x2 (__GFP_HIGHMEM) Link: http://lkml.kernel.org/r/1465548200-11384-1-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Sergey Senozhatsky Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/slub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mm/slub.c') diff --git a/mm/slub.c b/mm/slub.c index f5b3114b6a97..a2fe4edc3599 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1612,7 +1612,8 @@ out: static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) { if (unlikely(flags & GFP_SLAB_BUG_MASK)) { - pr_emerg("gfp: %u\n", flags & GFP_SLAB_BUG_MASK); + gfp_t invalid_mask = flags & GFP_SLAB_BUG_MASK; + pr_emerg("Unexpected gfp: %#x (%pGg)\n", invalid_mask, &invalid_mask); BUG(); } -- cgit v1.2.3