Re:[PATCH v2] RISC-V: KVM: Fix use-after-free in kvm_riscv_aia_aplic_has_attr()

From: Jiakai Xu

Date: Tue Mar 03 2026 - 00:56:58 EST


Hi Ryan,

Thank you for pointing this out.

I did notice that the IMSIC branch follows a similar pattern. However,
I am planning to address the KVM_DEV_RISCV_AIA_GRP_IMSIC case in a
separate commit to keep this fix focused strictly on the reported APLIC
use-after-free issue.

I will send a follow-up patch to add the corresponding locking for the
IMSIC branch.

Thanks again for the careful review.

Best regards,
Jiakai