[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y36hials.fsf@linutronix.de>
Date: Fri, 15 Feb 2019 11:56:15 +0100
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Daniel Wang <wonderfly@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Jiri Slaby <jslaby@...e.com>,
Peter Feiner <pfeiner@...gle.com>,
linux-serial@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [RFC PATCH v1 02/25] printk-rb: add prb locking functions
On 2019-02-15, Petr Mladek <pmladek@...e.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
Powered by blists - more mailing lists