lkml.org 
[lkml]   [2018]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Ratelimit messages printed by console drivers
On Fri 2018-04-20 11:13:07, Steven Rostedt wrote:
> On Fri, 20 Apr 2018 16:57:20 +0200
> Petr Mladek <pmladek@suse.com> wrote:
>
>
> > No, call_console_drivers() is done with interrupts disabled:
> >
> > console_lock_spinning_enable();
> >
> > stop_critical_timings(); /* don't trace print latency */
> > ----> call_console_drivers(ext_text, ext_len, text, len);
> > start_critical_timings();
> >
> > if (console_lock_spinning_disable_and_check()) {
> > ----> printk_safe_exit_irqrestore(flags);
> > goto out;
> > }
> >
> > ----> printk_safe_exit_irqrestore(flags);
> >
> > They were called with interrupts disabled for ages, long before
> > printk_safe. In fact, it was all the time in the git kernel history.
> >
> > Therefore only NMIs are in the game. And they should be solved
> > by the above change.
> >
>
> Really?
>
>
> console_trylock_spinning(); /* console_owner now equals current */

No, console_trylock_spinning() does not modify console_owner. The
handshake is done using console_waiter variable.

console_owner is really set only between:

console_lock_spinning_enable()
console_lock_spinning_disable_and_check()

and this entire section is called with interrupts disabled.

Best Regards,
Petr

\
 
 \ /
  Last update: 2018-04-23 12:33    [W:0.070 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site