Messages in this thread | ![/](/images/icornerl.gif) | | From | John Ogness <> | Subject | Re: [RFC PATCH v1 02/25] printk-rb: add prb locking functions | Date | Fri, 15 Feb 2019 11:56:15 +0100 |
| |
On 2019-02-15, Petr Mladek <pmladek@suse.com> 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
| ![\](/images/icornerr.gif) |