From: Suren Baghdasaryan <surenb@google.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>,
syzbot <syzbot+23de6daeb71241d36a18@syzkaller.appspotmail.com>,
Liam.Howlett@oracle.com, akpm@linux-foundation.org,
jannh@google.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, lorenzo.stoakes@oracle.com,
pfalcato@suse.de, syzkaller-bugs@googlegroups.com,
Peter Zijlstra <peterz@infradead.org>,
Petr Mladek <pmladek@suse.com>
Subject: Re: [syzbot] [mm?] possible deadlock in __vma_start_write
Date: Wed, 4 Jun 2025 07:29:44 -0700 [thread overview]
Message-ID: <CAJuCfpEbRJ7vrptiC_NxSO_4U=mShZoiN+LdX8j5=rPux4cgdQ@mail.gmail.com> (raw)
In-Reply-To: <84qzzzoqkw.fsf@jogness.linutronix.de>
On Wed, Jun 4, 2025 at 1:31 AM John Ogness <john.ogness@linutronix.de> wrote:
>
> On 2025-06-04, Vlastimil Babka <vbabka@suse.cz> wrote:
> > After consulting PeterZ on IRC, he said:
> >
> >> so the thing complains about: vmlock <- mapping.invalidate_lock <- bcachefs_btree <- console_lock <- &helper->lock <- dev->mode_config.idr_mutex <- mm->mmap_lock <- vmlock
> >
> > so bcachefs is doing printk which wants console_lock, and in
> > drm console a possible lock chain exists that can lead to mmap lock
> >
> > To me it seems all rather theoretical, but not sure where and how we could safely
> > break this chain.
> > Hopefully one day console_lock goes away? :)
>
> It is a known problem that any caller holding a lock used by a
> registered legacy console will result in printk() deadlocking. This is
> particularly a problem with the port->lock and power management.
>
> One workaround is to enable CONFIG_PREEMPT_RT. ;-)
>
> A year ago (exactly) there was patch [0] providing a "threadprintk" boot
> argument that would also work around this problem.
>
> However, the only real solution is to convert the legacy consoles to
> nbcon. This is work in progress.
Thanks for additional info, folks! I'll look into it some more to see
if the chain can be broken somehow but most likely will have to live
with it for now.
Cheers,
Suren.
>
> John
>
> [0] https://lore.kernel.org/lkml/20240603232453.33992-17-john.ogness@linutronix.de
next prev parent reply other threads:[~2025-06-04 14:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 15:40 syzbot
2025-06-02 13:04 ` Lorenzo Stoakes
2025-06-02 14:16 ` Suren Baghdasaryan
2025-06-02 14:19 ` Lorenzo Stoakes
2025-06-04 0:51 ` Suren Baghdasaryan
2025-06-04 5:17 ` Lorenzo Stoakes
2025-06-04 7:52 ` Vlastimil Babka
2025-06-04 8:31 ` John Ogness
2025-06-04 14:29 ` Suren Baghdasaryan [this message]
2025-06-05 9:40 ` Petr Mladek
2025-06-05 10:48 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJuCfpEbRJ7vrptiC_NxSO_4U=mShZoiN+LdX8j5=rPux4cgdQ@mail.gmail.com' \
--to=surenb@google.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=peterz@infradead.org \
--cc=pfalcato@suse.de \
--cc=pmladek@suse.com \
--cc=syzbot+23de6daeb71241d36a18@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox