Re: [RFC PATCH v1 02/25] printk-rb: add prb locking functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux