summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv/hal/os/linux
diff options
context:
space:
mode:
authorXianzhong <xianzhong.li@nxp.com>2018-09-08 05:42:57 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:33:54 +0800
commit4c2ce6336e91794523dc1c8e998eb895c61c18c1 (patch)
treeb533b6bd6229b29d77820f7ed63dedbc8fbb21da /drivers/mxc/gpu-viv/hal/os/linux
parentac8c2254b2769531db41613217ad2b97f7e08dee (diff)
MGS-4151-9 [#imx-1166] merge kernel panic fix in GFP oom
CL167496 fix kernel panic caused by out-of-memory fix panic issue in bug #20884 comment #12 cherry-pick patch: 6.2.4.p3-0044-CL167496-fix-kernel-panic-caused-by-out-of-memory-fi Signed-off-by: Xianzhong <xianzhong.li@nxp.com> (cherry picked from commit f3a1c75a48e16441a939f20824fe1e2ebd5cc83d)
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/os/linux')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_gfp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_gfp.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_gfp.c
index a4fed0a3b6f9..937c7521ff0e 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_gfp.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_gfp.c
@@ -310,6 +310,11 @@ _GFPAlloc(
mdlPriv = kzalloc(sizeof(struct gfp_mdl_priv), GFP_KERNEL | __GFP_NORETRY);
+ if (!mdlPriv)
+ {
+ gcmkONERROR(gcvSTATUS_OUT_OF_MEMORY);
+ }
+
#if defined(CONFIG_ZONE_DMA32) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
if ((Flags & gcvALLOC_FLAG_4GB_ADDR) || (Allocator->os->device->platform->flagBits & gcvPLATFORM_FLAG_LIMIT_4G_ADDRESS))
{