diff options
| author | Marc Zyngier <maz@kernel.org> | 2026-02-28 19:45:59 +0300 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-03-05 18:18:38 +0300 |
| commit | ac6769c8f948dff33265c50e524aebf9aa6f1be0 (patch) | |
| tree | d6051f19d2b5296095367412b0d0cf9e2b6aed90 /include/linux/debugobjects.h | |
| parent | 11439c4635edd669ae435eec308f4ab8a0804808 (diff) | |
| download | linux-ac6769c8f948dff33265c50e524aebf9aa6f1be0.tar.xz | |
KVM: arm64: Eagerly init vgic dist/redist on vgic creation
If vgic_allocate_private_irqs_locked() fails for any odd reason,
we exit kvm_vgic_create() early, leaving dist->rd_regions uninitialised.
kvm_vgic_dist_destroy() then comes along and walks into the weeds
trying to free the RDs. Got to love this stuff.
Solve it by moving all the static initialisation early, and make
sure that if we fail halfway, we're in a reasonable shape to
perform the rest of the teardown. While at it, reset the vgic model
on failure, just in case...
Reported-by: syzbot+f6a46b038fc243ac0175@syzkaller.appspotmail.com
Tested-by: syzbot+f6a46b038fc243ac0175@syzkaller.appspotmail.com
Fixes: b3aa9283c0c50 ("KVM: arm64: vgic: Hoist SGI/PPI alloc from vgic_init() to kvm_create_vgic()")
Link: https://lore.kernel.org/r/69a2d58c.050a0220.3a55be.003b.GAE@google.com
Link: https://patch.msgid.link/20260228164559.936268-1-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
