From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+cef594105ac7e60c6d93@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kvmarm?] [kvm?] WARNING: locking bug in vgic_put_irq
Date: Wed, 10 Sep 2025 08:03:09 +0800 [thread overview]
Message-ID: <20250910000310.6672-1-hdanton@sina.com> (raw)
In-Reply-To: <68acd0d9.a00a0220.33401d.048b.GAE@google.com>
> Date: Mon, 25 Aug 2025 14:08:41 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 7b8346bd9fce KVM: arm64: Don't attempt vLPI mappings when ..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
> console output: https://syzkaller.appspot.com/x/log.txt?x=17b4e862580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=7c53d3478750eda0
> dashboard link: https://syzkaller.appspot.com/bug?extid=cef594105ac7e60c6d93
> compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15860634580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1074e862580000
#syz test
--- x/arch/arm64/kvm/vgic/vgic.c
+++ y/arch/arm64/kvm/vgic/vgic.c
@@ -146,20 +146,25 @@ void vgic_flush_pending_lpis(struct kvm_
struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
struct vgic_irq *irq, *tmp;
unsigned long flags;
+ LIST_HEAD(head);
raw_spin_lock_irqsave(&vgic_cpu->ap_list_lock, flags);
list_for_each_entry_safe(irq, tmp, &vgic_cpu->ap_list_head, ap_list) {
if (irq->intid >= VGIC_MIN_LPI) {
raw_spin_lock(&irq->irq_lock);
- list_del(&irq->ap_list);
+ list_move(&irq->ap_list, &head);
irq->vcpu = NULL;
raw_spin_unlock(&irq->irq_lock);
- vgic_put_irq(vcpu->kvm, irq);
}
}
raw_spin_unlock_irqrestore(&vgic_cpu->ap_list_lock, flags);
+
+ list_for_each_entry_safe(irq, tmp, &head, ap_list) {
+ list_del(&irq->ap_list);
+ vgic_put_irq(vcpu->kvm, irq);
+ }
}
void vgic_irq_set_phys_pending(struct vgic_irq *irq, bool pending)
--
next prev parent reply other threads:[~2025-09-10 0:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 21:08 syzbot
2025-09-09 21:23 ` Oliver Upton
2025-09-09 22:14 ` syzbot
2025-09-10 0:03 ` Hillf Danton [this message]
2025-09-10 0:53 ` 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=20250910000310.6672-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+cef594105ac7e60c6d93@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 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®