lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH v1 02/25] printk-rb: add prb locking functions
Date
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

\
 
 \ /
  Last update: 2019-02-15 11:57    [W:0.101 / U:0.612 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site