Re: [PATCH] kernel/locking: make __down_common use flags previously saved

From: Ingo Molnar
Date: Wed May 12 2021 - 16:34:34 EST



* Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx> wrote:

> down, down_interruptible, down_killable, and down_timeout
> call raw_spin_lock_irqsave that saves current status to flags.
>
> but in __down_common, that is called by functions above, calls
> raw_spin_lock_irq and raw_spin_unlock_irq regardless of flags previously saved.

Yes, this is intentional, because if we get into __down_common() we have to
schedule, so we have to enable interrupts.

> this mismatch can potentially cause problem.

What problems?

Thanks,

Ingo