summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2025-03-14 16:34:09 +0300
committerOliver Upton <oliver.upton@linux.dev>2025-03-18 09:30:51 +0300
commit250f25367b58d8c65a1b060a2dda037eea09a672 (patch)
tree634a22f24a0712ccaa802125e5e08f2584ddbd7e /tools/perf/scripts/python/gecko.py
parentd766d87cf4a0a415a45bbb8fc2e3a4cc1995654d (diff)
downloadlinux-250f25367b58d8c65a1b060a2dda037eea09a672.tar.xz
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: <stable@vger.kernel.org> Cc: Marc Zyngier <maz@kernel.org> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Quentin Perret <qperret@google.com> Signed-off-by: Will Deacon <will@kernel.org> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250314133409.9123-1-will@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions