diff options
| author | Will Deacon <[email protected]> | 2025-03-14 13:34:09 +0000 |
|---|---|---|
| committer | Oliver Upton <[email protected]> | 2025-03-18 06:30:51 +0000 |
| commit | 250f25367b58d8c65a1b060a2dda037eea09a672 (patch) | |
| tree | 634a22f24a0712ccaa802125e5e08f2584ddbd7e /net/unix/unix_bpf.c | |
| parent | KVM: arm64: Document ordering requirements for irqbypass (diff) | |
| download | kernel-250f25367b58d8c65a1b060a2dda037eea09a672.tar.gz kernel-250f25367b58d8c65a1b060a2dda037eea09a672.zip | |
KVM: arm64: Tear down vGIC on failed vCPU creation
If kvm_arch_vcpu_create() fails to share the vCPU page with the
hypervisor, we propagate the error back to the ioctl but leave the
vGIC vCPU data initialised. Note only does this leak the corresponding
memory when the vCPU is destroyed but it can also lead to use-after-free
if the redistributor device handling tries to walk into the vCPU.
Add the missing cleanup to kvm_arch_vcpu_create(), ensuring that the
vGIC vCPU structures are destroyed on error.
Cc: <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Oliver Upton <[email protected]>
Cc: Quentin Perret <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Reviewed-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions
