[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YYvHW1OpN1L2uInb@phenom.ffwll.local>
Date: Wed, 10 Nov 2021 14:21:31 +0100
From: Daniel Vetter <daniel@...ll.ch>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Petr Mladek <pmladek@...e.com>,
Sultan Alsawaf <sultan@...neltoast.com>,
Anton Vorontsov <anton@...msg.org>,
Ben Segall <bsegall@...gle.com>,
Colin Cross <ccross@...roid.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Dietmar Eggemann <dietmar.eggemann@....com>,
dri-devel@...ts.freedesktop.org, Ingo Molnar <mingo@...hat.com>,
John Ogness <john.ogness@...utronix.de>,
Juri Lelli <juri.lelli@...hat.com>,
Kees Cook <keescook@...omium.org>,
linux-kernel@...r.kernel.org,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Mel Gorman <mgorman@...e.de>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Tony Luck <tony.luck@...el.com>,
Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: printk deadlock due to double lock attempt on current CPU's
runqueue
On Wed, Nov 10, 2021 at 12:20:05PM +0100, Peter Zijlstra wrote:
> On Wed, Nov 10, 2021 at 11:50:38AM +0100, Petr Mladek wrote:
> > On Tue 2021-11-09 12:06:48, Sultan Alsawaf wrote:
> > > Hi,
> > >
> > > I encountered a printk deadlock on 5.13 which appears to still affect the latest
> > > kernel. The deadlock occurs due to printk being used while having the current
> > > CPU's runqueue locked, and the underlying framebuffer console attempting to lock
> > > the same runqueue when printk tries to flush the log buffer.
> > >
> > > I'm not sure what the *correct* solution is here (don't use printk while having
> > > a runqueue locked? don't use schedule_work() from the fbcon path? tell printk
> > > to use one of its lock-less backends?), so I've cc'd all the relevant folks.
> >
> > At the moment, printk_deferred() could be used here. It defers the
> > console handling via irq_work().
>
> I think I've rejected that patch at least twice now :-) John's printk
> stuff will really land real soon now, right.
Yeah whacking all affected prinkt callers just because of fbcon does not
sound like a good idea to me either.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists