lkml.org 
[lkml]   [2017]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/slub: Add a dump_stack() to the unexpected GFP check
On Mon, Jan 16, 2017 at 10:16:43AM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> We wanna know who's doing such a thing. Like slab.c does that.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> mm/slub.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 067598a00849..1b0fa7625d6d 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1623,6 +1623,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();

Will it make sense to change these two lines above to WARN(true, .....)?

> }
>
> return allocate_slab(s,
> --
> 2.11.0
>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-01-16 10:29    [W:0.102 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site