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). John Ogness