Re: [PATCH] mm: might_sleep warning
From: Pavel Tatashin
Date: Tue Mar 06 2018 - 16:49:13 EST
That's why page_alloc_init_late() needs spin_lock_irq(). If a CPU is
holding deferred_zone_grow_lock with enabled interrupts and an
interrupt comes in on that CPU and the CPU runs deferred_grow_zone() in
its interrupt handler, we deadlock.
lockdep knows about this bug and should have reported it.
I see what you are saying. Yes you are correct, we need spin_lock_irq()
in page_alloc_init_late(). I will update the patch. I am not sure why
lockdep has not reported it. May be it is initialized after this code is
executed?
Thank you,
Pavel