lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/irq: Use printk_deferred() on raw_spin_lock() protected sections
On Thu, Sep 24, 2020 at 09:08:57AM -0700, Joe Perches wrote:
> On Thu, 2020-09-24 at 12:28 +0200, Peter Zijlstra wrote:
> > On Mon, Sep 21, 2020 at 06:22:12PM +0200, Daniel Bristot de Oliveira wrote:
> > > While testing hotplug I got this BUG:
> > > It was caused by printk() inside a code section protected by a
> > > raw_spin_lock() that ended up calling a serial console that
> > > uses a regular spin_lock().
> > >
> > > Use the printk_deferred() to avoid calling the serial console
> > > in a raw_spin_lock() protected section.
> >
> > I consider printk_deferred() to be a bug, can't we just wait for the new
> > printk implementation to land so we don't need all this nonsense?
>
> It will be good to do a sed fixup for all these
> printk_deferred uses soon, but in the meantime
> isn't it useful to avoid BUGs?

The kernel isn't PROVE_RAW_LOCK_NESTING clean anyway. Printk is one of
the biggest offenders there anyway, iirc.

\
 
 \ /
  Last update: 2020-09-25 11:21    [W:0.050 / U:9.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site