OSDN Git Service

KVM: arm/arm64: vgic-its: Check result of allocation before use
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 16 Nov 2017 17:58:18 +0000 (17:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:28:14 +0000 (09:28 +0100)
commit7df3dbef3dd5bd1e0a7e1902aab7c5bdd8923a81
tree7c62131aed0d07d17a680ab5d12fd067bbabdb65
parent42c3f4c55f10102b3e522ae99754a9a0ea41235d
KVM: arm/arm64: vgic-its: Check result of allocation before use

commit 686f294f2f1ae40705283dd413ca1e4c14f20f93 upstream.

We miss a test against NULL after allocation.

Fixes: 6d03a68f8054 ("KVM: arm64: vgic-its: Turn device_id validation into generic ID validation")
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/arm/vgic/vgic-its.c