All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+10b4363fb0f46527f3f3@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [sound?] possible deadlock in __snd_pcm_lib_xfer (2)
Date: Sat, 30 Aug 2025 08:45:48 +0800	[thread overview]
Message-ID: <20250830004549.6070-1-hdanton@sina.com> (raw)
In-Reply-To: <68b1f3ab.a70a0220.f8cc2.00f0.GAE@google.com>

> Date: Fri, 29 Aug 2025 11:38:35 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    07d9df80082b Merge tag 'perf-tools-fixes-for-v6.17-2025-08..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=17333fbc580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e1e1566c7726877e
> dashboard link: https://syzkaller.appspot.com/bug?extid=10b4363fb0f46527f3f3
> compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=160e9262580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17ed0242580000

#syz test

--- x/kernel/time/hrtimer.c
+++ y/kernel/time/hrtimer.c
@@ -1718,7 +1718,7 @@ EXPORT_SYMBOL_GPL(hrtimer_active);
 static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
 			  struct hrtimer_clock_base *base,
 			  struct hrtimer *timer, ktime_t *now,
-			  unsigned long flags) __must_hold(&cpu_base->lock)
+			  unsigned long flags, bool soft) __must_hold(&cpu_base->lock)
 {
 	enum hrtimer_restart (*fn)(struct hrtimer *);
 	bool expires_in_hardirq;
@@ -1755,6 +1755,8 @@ static void __run_hrtimer(struct hrtimer
 	 * is dropped.
 	 */
 	raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
+	if (soft)
+		hrtimer_cpu_base_unlock_expiry(cpu_base);
 	trace_hrtimer_expire_entry(timer, now);
 	expires_in_hardirq = lockdep_hrtimer_enter(timer);
 
@@ -1762,6 +1764,8 @@ static void __run_hrtimer(struct hrtimer
 
 	lockdep_hrtimer_exit(expires_in_hardirq);
 	trace_hrtimer_expire_exit(timer);
+	if (soft)
+		hrtimer_cpu_base_lock_expiry(cpu_base);
 	raw_spin_lock_irq(&cpu_base->lock);
 
 	/*
@@ -1822,7 +1826,8 @@ static void __hrtimer_run_queues(struct
 			if (basenow < hrtimer_get_softexpires_tv64(timer))
 				break;
 
-			__run_hrtimer(cpu_base, base, timer, &basenow, flags);
+			__run_hrtimer(cpu_base, base, timer, &basenow, flags,
+					active_mask == HRTIMER_ACTIVE_SOFT);
 			if (active_mask == HRTIMER_ACTIVE_SOFT)
 				hrtimer_sync_wait_running(cpu_base, flags);
 		}
--

  parent reply	other threads:[~2025-08-30  0:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 18:38 [syzbot] [sound?] possible deadlock in __snd_pcm_lib_xfer (2) 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 ` Hillf Danton [this message]
2025-08-30  3:03   ` [syzbot] [sound?] possible deadlock in __snd_pcm_lib_xfer (2) 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

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=20250830004549.6070-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+10b4363fb0f46527f3f3@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.