From: Hillf Danton <hdanton@sina.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: syzbot <syzbot+10b4363fb0f46527f3f3@syzkaller.appspotmail.com>,
Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [sound?] possible deadlock in __snd_pcm_lib_xfer (2)
Date: Fri, 5 Sep 2025 11:04:29 +0800 [thread overview]
Message-ID: <20250905030430.6482-1-hdanton@sina.com> (raw)
In-Reply-To: <20250904061245.pqGf3VwT@linutronix.de>
On Thu, 4 Sep 2025 08:12:45 +0200 Sebastian Andrzej Siewior wrote:
> On 2025-09-04 09:05:28 [+0800], Hillf Danton wrote:
> > On Wed, 3 Sep 2025 16:59:05 +0200 Sebastian Andrzej Siewior wrote:
> > > On 2025-08-30 14:56:37 [+0800], Hillf Danton wrote:
> > > > > syz.0.46/6843 is trying to acquire lock:
> > > > > ffff8880b8823d90 ((softirq_ctrl.lock)){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:44 [inline]
> > > > > ffff8880b8823d90 ((softirq_ctrl.lock)){+.+.}-{3:3}, at: __local_bh_disable_ip+0x264/0x400 kernel/softirq.c:168
> > > > >
> > > > Given softirq_ctrl is percpu, this report is false positive.
> > >
> > > No. This can happen on a single CPU.
> > >
> > But the single CPU theory fails to explain the deadlock reported.
> >
> > > > > Possible unsafe locking scenario:
> > > > >
> > > > > CPU0 CPU1
> > > > > ---- ----
> Thead0 Thread1
> ------ -------c
> > > > > lock(&group->lock#2);
> preempt to ->
> > > > > lock((softirq_ctrl.lock));
> > > > > lock(&group->lock#2);
> <- preempt to
> > > > > lock((softirq_ctrl.lock));
> > > > >
> > > > > *** DEADLOCK ***
> now nobody makes progress
>
Because of the absense of the deadlock detecting mechanism in timer, see
lock_map_acquire() in call_timer_fn() for detail, hrtimer is unable to
detect deadlock like the reported one.
CPU0 CPU1
---- ----
lock A hrtimer B callback
cancel hrtimer B lock A
On the other hand softirq_ctrl plays such a detecting role in accident, but
they are two entirely different things.
prev parent reply other threads:[~2025-09-05 3:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 18:38 syzbot
2025-08-30 0:06 ` syzbot
2025-09-04 10:20 ` Sebastian Andrzej Siewior
2025-09-04 10:38 ` Takashi Iwai
2025-09-15 15:28 ` [PATCH] ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT Sebastian Andrzej Siewior
2025-09-16 9:43 ` Takashi Iwai
2025-09-16 12:23 ` Sebastian Andrzej Siewior
2025-08-30 0:45 ` [syzbot] [sound?] possible deadlock in __snd_pcm_lib_xfer (2) Hillf Danton
2025-08-30 3:03 ` syzbot
2025-08-30 6:56 ` Hillf Danton
2025-09-03 14:59 ` Sebastian Andrzej Siewior
2025-09-04 1:05 ` Hillf Danton
2025-09-04 6:12 ` Sebastian Andrzej Siewior
2025-09-05 3:04 ` Hillf Danton [this message]
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=20250905030430.6482-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+10b4363fb0f46527f3f3@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tiwai@suse.de \
/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
all inboxes | Powered by JetHome®