All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "KVM: arm/arm64: vgic-its: Check result of allocation before use" has been added to the 4.9-stable tree
@ 2017-12-11 22:18 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-11 22:18 UTC (permalink / raw)
  To: marc.zyngier, christoffer.dall, gregkh, takahiro.akashi
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    KVM: arm/arm64: vgic-its: Check result of allocation before use

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-arm-arm64-vgic-its-check-result-of-allocation-before-use.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 686f294f2f1ae40705283dd413ca1e4c14f20f93 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <marc.zyngier@arm.com>
Date: Thu, 16 Nov 2017 17:58:18 +0000
Subject: KVM: arm/arm64: vgic-its: Check result of allocation before use

From: Marc Zyngier <marc.zyngier@arm.com>

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 |    2 ++
 1 file changed, 2 insertions(+)

--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -687,6 +687,8 @@ static int vgic_its_alloc_collection(str
 		return E_ITS_MAPC_COLLECTION_OOR;
 
 	collection = kzalloc(sizeof(*collection), GFP_KERNEL);
+	if (!collection)
+		return -ENOMEM;
 
 	collection->collection_id = coll_id;
 	collection->target_addr = COLLECTION_NOT_MAPPED;


Patches currently in stable-queue which might be from marc.zyngier@arm.com are

queue-4.9/arm-kvm-fix-vttbr_baddr_mask-bug_on-off-by-one.patch
queue-4.9/kvm-arm-arm64-vgic-its-check-result-of-allocation-before-use.patch
queue-4.9/kvm-arm-arm64-vgic-irqfd-fix-msi-entry-allocation.patch
queue-4.9/bus-arm-cci-fix-use-of-smp_processor_id-in-preemptible-context.patch
queue-4.9/arm64-kvm-fix-vttbr_baddr_mask-bug_on-off-by-one.patch
queue-4.9/bus-arm-ccn-fix-use-of-smp_processor_id-in-preemptible-context.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-11 22:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 22:18 Patch "KVM: arm/arm64: vgic-its: Check result of allocation before use" has been added to the 4.9-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.