lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] mm/page_isolation: fix a deadlock with printk()
From
Date
On Tue, 2019-10-08 at 15:08 +0200, Petr Mladek wrote:
> On Mon 2019-10-07 10:59:10, Qian Cai wrote:
> > It is almost impossible to eliminate all the indirect call chains from
> > console_sem/console_owner_lock to zone->lock because it is too normal that
> > something later needs to allocate some memory dynamically, so as long as it
> > directly call printk() with zone->lock held, it will be in trouble.
>
> It is not normal the something needs to allocate memory under
> console_sem. Console drivers are supposed to get the message
> out even when the system is in really bad state and it is not
> possible to allocate memory. I consider this a bug in the console
> driver.

Again, it is not directly under console_sem. It is *indirect*.

console_sem --> lockA
lockA --> lockB
lockB --> lockC

Anything allocating memory with lockB or lockC held will form the problematic
lock chain to trigger the lockdep splat with memory offline.

\
 
 \ /
  Last update: 2019-10-08 15:34    [W:0.118 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site