From: syzbot <syzbot+919877893c9d28162dc2@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Re: [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths
Date: Sun, 09 Aug 2026 02:42:55 -0700 [thread overview]
Message-ID: <6a784b9f.01d0871a.3a0d52.0083.GAE@google.com> (raw)
In-Reply-To: <673f4bbc.050a0220.3c9d61.0174.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths
Author: dwmw2@infradead.org
On Fri, 2026-08-07 at 17:49 +0530, sai madhu wrote:
> kvm_xen_set_evtchn_fast() is called from hardirq context (xen timer
> callback, kvm_arch_set_irq_inatomic()). On PREEMPT_RT (and under
> lockdep), read_lock_irqsave(&gpc->lock) is invalid there because
> rwlock_t may sleep.
>
> Switch to read_trylock() and return -EWOULDBLOCK when the lock is
> contended or the cache is invalid. xen_timer_callback() already
> defers to the slow path (timer_pending + KVM_REQ_UNBLOCK +
> kvm_xen_inject_timer_irqs()).
>
> Also fix __kvm_xen_has_interrupt() the same way for atomic callers.
>
> Based on David Woodhouse's upstream series (May 2026, patch 3/7).
> Fixes syzbot: https://syzkaller.appspot.com/bug?extid=919877893c9d28162dc2
Thanks... but why? We're literally iterating on this right now.
I'm fairly convinced I want to ditch rwlocks completely and move to RCU:
https://lore.kernel.org/all/20260805195528.3853473-1-dwmw@amazon.co.uk/
Testing found some issues in my conversion which I've since fixed, and
the conversion to SRCU at Sean's request is currently an *incremental*
patch, which I'll eventually squash back into the first.
I'm in the middle of running a weekend-long soak test on this tree:
https://git.infradead.org/?p=users/dwmw2/linux.git;a=shortlog;h=refs/heads/xen-rcu-fixed
Let's see what syzbot thinks of it...
#syz test: git://git.infradead.org/users/dwmw2/linux.git xen-rcu-fixed
next prev parent reply other threads:[~2026-08-09 9:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 15:03 [syzbot] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast syzbot
2024-11-23 13:17 ` syzbot
2024-11-23 23:32 ` Hillf Danton
2024-11-26 14:24 ` syzbot
2024-11-26 14:49 ` David Woodhouse
2024-11-26 15:03 ` Sebastian Andrzej Siewior
2024-11-26 16:26 ` David Woodhouse
2026-03-15 13:58 ` Forwarded: syzbot
2026-03-15 15:00 ` Forwarded: (No Subject) syzbot
2026-03-15 15:07 ` syzbot
2026-08-09 9:42 ` syzbot [this message]
2026-08-10 11:28 ` Forwarded: Re: [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast syzbot
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=6a784b9f.01d0871a.3a0d52.0083.GAE@google.com \
--to=syzbot+919877893c9d28162dc2@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox