Patch "vfio/spapr_tce: Check kzalloc() return when preregistering memory" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
vfio/spapr_tce: Check kzalloc() return when preregistering memory
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:
vfio-spapr_tce-check-kzalloc-return-when-preregistering-memory.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 <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Alexey Kardashevskiy <[email protected]>
Date: Mon, 27 Mar 2017 14:23:40 +1100
Subject: vfio/spapr_tce: Check kzalloc() return when preregistering memory
From: Alexey Kardashevskiy <[email protected]>
[ Upstream commit 3393af24b665cb0aea7353b05e522b03ab1e7d73 ]
This adds missing checking for kzalloc() return value.
--- drivers/vfio/vfio_iommu_spapr_tce.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/vfio/vfio_iommu_spapr_tce.c +5 -0
@@ -195,6 +195,11 @@ static long tce_iommu_register_pages(strreturn ret; tcemem =kzalloc (sizeof (*tcemem),GFP_KERNEL ); +if (!tcemem) { +mm_iommu_put (container->mm, mem); +return -ENOMEM ; + } + tcemem->mem = mem;list_add (&tcemem->next, &container->prereg_list);
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/vfio-spapr_tce-check-kzalloc-return-when-preregistering-memory.patch queue-4.9/vfio-powerpc-spapr_tce-enforce-iommu-type-compatibility-check.patch