Re: [PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing

From: Pekka Enberg
Date: Mon Apr 02 2012 - 14:38:11 EST


On Mon, Apr 2, 2012 at 9:35 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> Something like so?
>
> ---
>  kernel/lockdep.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> index ea9ee45..a028ba9 100644
> --- a/kernel/lockdep.c
> +++ b/kernel/lockdep.c
> @@ -2718,6 +2718,13 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
>  {
>        struct task_struct *curr = current;
>
> +       /*
> +        * We do GFP_KERNEL allocations with IRQs disabled during system
> +        * bringup..
> +        */
> +       if (unlikely(system_state != SYSTEM_RUNNING))
> +               return;
> +
>        if (unlikely(!debug_locks))
>                return;

Yes, please.

Acked-by: Pekka Enberg <penberg@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/