summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic/vgic.c
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2016-08-01 20:25:33 +0200
committerChristoffer Dall <christoffer.dall@linaro.org>2016-08-10 11:41:35 +0200
commit99e5e886a0a59df267ff6838f763b789847df982 (patch)
treea3f144ed79a1cd132ab8c3667a25cedc685e0461 /virt/kvm/arm/vgic/vgic.c
parentfd837b08d98c0c9f4f31998f2ed55b9d8694082c (diff)
downloadlinux-99e5e886a0a59df267ff6838f763b789847df982.tar.gz
linux-99e5e886a0a59df267ff6838f763b789847df982.tar.bz2
linux-99e5e886a0a59df267ff6838f763b789847df982.zip
KVM: arm64: vgic-its: Handle errors from vgic_add_lpi
During low memory conditions, we could be dereferencing a NULL pointer when vgic_add_lpi fails to allocate memory. Consider for example this call sequence: vgic_its_cmd_handle_mapi itte->irq = vgic_add_lpi(kvm, lpi_nr); update_lpi_config(kvm, itte->irq, NULL); ret = kvm_read_guest(kvm, propbase + irq->intid ^^^^ kaboom? Instead, return an error pointer from vgic_add_lpi and check the return value from its single caller. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic.c')
0 files changed, 0 insertions, 0 deletions