From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: syzbot <syzbot+919877893c9d28162dc2@syzkaller.appspotmail.com>,
boqun.feng@gmail.com, bp@alien8.de, dave.hansen@linux.intel.com,
hdanton@sina.com, hpa@zytor.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, longman@redhat.com,
mingo@redhat.com, paul@xen.org, pbonzini@redhat.com,
seanjc@google.com, syzkaller-bugs@googlegroups.com,
tglx@linutronix.de, x86@kernel.org
Subject: Re: [syzbot] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast
Date: Tue, 26 Nov 2024 16:03:31 +0100 [thread overview]
Message-ID: <20241126150331.E3qHY1JP@linutronix.de> (raw)
In-Reply-To: <391f1c231cfce2c4107494b47114ed049c4d6266.camel@infradead.org>
On 2024-11-26 14:49:40 [+0000], David Woodhouse wrote:
> On Tue, 2024-11-26 at 06:24 -0800, syzbot wrote:
> > syzbot has bisected this issue to:
> >
> > commit 560af5dc839eef08a273908f390cfefefb82aa04
> > Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > Date: Wed Oct 9 15:45:03 2024 +0000
> >
> > lockdep: Enable PROVE_RAW_LOCK_NESTING with PROVE_LOCKING.
>
> That's not it; this has always been broken with PREEMPT_RT I think.
> There was an attempt to fix it in
> https://lore.kernel.org/all/20240227115648.3104-8-dwmw2@infradead.org/
>
> I'll dust that off and try again.
Oh thank you. The timer has been made to always expire in hardirq due to
HRTIMER_MODE_ABS_HARD, this is why you see the splat. If the hardirq
invocation is needed/ possible then the callback needs to be updated.
The linked patch has this hunk:
|- read_lock_irqsave(&gpc->lock, flags);
|+ local_irq_save(flags);
|+ if (!read_trylock(&gpc->lock)) {
…
|+ if (in_interrupt())
|+ goto out;
|+
|+ read_lock(&gpc->lock);
This does not work. If interrupts are disabled (due to local_irq_save())
then read_lock() must not be used. in_interrupt() does not matter.
Side note: Using HRTIMER_MODE_ABS would avoid the splat at the cost that
on PREEMPT_RT the timer will be invoked in softirq context (as with
HRTIMER_MODE_ABS_SOFT on !PREEMPT_RT). There is no changed behaviour on
!PREEMPT_RT.
Sebastian
next prev parent reply other threads:[~2024-11-26 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 15:03 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 [this message]
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 ` Forwarded: Re: [PATCH] KVM: x86/xen: Use read_trylock() for GPC locks in hardirq paths syzbot
2026-08-10 11:28 ` Forwarded: Re: [syzbot] [kvm-x86?] [kvm?] WARNING: locking bug in kvm_xen_set_evtchn_fast syzbot
2026-08-11 11:24 ` Forwarded: 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=20241126150331.E3qHY1JP@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=hdanton@sina.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=syzbot+919877893c9d28162dc2@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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®