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)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 29 Nov 2017 15:46:15 +0000 (16:46 +0100)
commit686f294f2f1ae40705283dd413ca1e4c14f20f93
tree6b81fe604cd84c8c4dbe6cc9f5c2fef6bdf3ffdd
parent64afe6e9eb4841f35317da4393de21a047a883b3
KVM: arm/arm64: vgic-its: Check result of allocation before use

We miss a test against NULL after allocation.

Fixes: 6d03a68f8054 ("KVM: arm64: vgic-its: Turn device_id validation into generic ID validation")
Cc: stable@vger.kernel.org # 4.8
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>
virt/kvm/arm/vgic/vgic-its.c