Re: [PATCH -next v5] mm/hotplug: silence a lockdep splat with printk()

From: Michal Hocko
Date: Mon Jan 20 2020 - 02:23:08 EST


On Fri 17-01-20 11:35:08, Qian Cai wrote:
>
>
> > On Jan 17, 2020, at 11:27 AM, David Hildenbrand <david@xxxxxxxxxx> wrote:
> >
> > the "int" should go onto the next line as well
> > [...]
>
> Yes.
>
> > apart from that looks good to me. I hope we won't have a whac-a-mole
> > with printk() (including WARN_ON() etc?) under the zone lock. This all
> > screams for a better fix.
>
> WARN_ON() is normally not a concern. Once it happens here, we will
> figure out the reason why it happens in the first place and shut it
> off there instead.

It is very much the same concern as any other printk which might
deadlock. It is true this is WARN_ONCE so the likelyhood is much
smaller. But you know, probability is not going to help you if you are
unlucky ;)

--
Michal Hocko
SUSE Labs