Re: [RFC PATCH v1 02/25] printk-rb: add prb locking functions
From: John Ogness
Date: Fri Feb 15 2019 - 05:56:27 EST
On 2019-02-15, Petr Mladek <pmladek@xxxxxxxx> wrote:
>>> void prb_lock(struct prb_cpulock *cpu_lock)
>>> unsigned int flags;
>>> int cpu;
>> I added an explicit preempt_disable here:
>> cpu = get_cpu();
> It is superfluous. Preemption is not possible when interrupts
> are disabled.
Interrupts are not necessarily disabled here. They get disabled later if
the lock needs to be taken (i.e. we are not nested).