mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
msm: kgsl: Correct gfp mask passed to kvcalloc
Remove __GFP_NOWARN and __GFP_NORETRY gfp masks from kvcalloc calls to avoid out of memory errors because of not triggering shrinker in cases we are in low memory situations. Change-Id: I79936816f895d0f79c7620cda00114457893b349 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
This commit is contained in:
parent
d3b331a720
commit
fde3eab781
4 changed files with 6 additions and 10 deletions
|
|
@ -1950,8 +1950,7 @@ long kgsl_ioctl_gpu_aux_command(struct kgsl_device_private *dev_priv,
|
|||
if (param->flags & KGSL_GPU_AUX_COMMAND_SYNC)
|
||||
count++;
|
||||
|
||||
drawobjs = kvcalloc(count, sizeof(*drawobjs),
|
||||
GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
|
||||
drawobjs = kvcalloc(count, sizeof(*drawobjs), GFP_KERNEL);
|
||||
|
||||
if (!drawobjs) {
|
||||
kgsl_context_put(context);
|
||||
|
|
@ -2396,8 +2395,7 @@ static int memdesc_sg_virt(struct kgsl_memdesc *memdesc, unsigned long useraddr)
|
|||
if (sglen == 0 || sglen >= LONG_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
pages = kvcalloc(sglen, sizeof(*pages),
|
||||
GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
|
||||
pages = kvcalloc(sglen, sizeof(*pages), GFP_KERNEL);
|
||||
if (pages == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
|
|
@ -881,8 +881,7 @@ int kgsl_drawobj_add_timeline(struct kgsl_device_private *dev_priv,
|
|||
return -EINVAL;
|
||||
|
||||
timelineobj->timelines = kvcalloc(cmd.count,
|
||||
sizeof(*timelineobj->timelines),
|
||||
GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
|
||||
sizeof(*timelineobj->timelines), GFP_KERNEL);
|
||||
if (!timelineobj->timelines)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
|
|
@ -443,8 +443,7 @@ int kgsl_pool_alloc_pages(u64 size, struct page ***pages, struct device *dev)
|
|||
{
|
||||
int count = 0;
|
||||
int npages = size >> PAGE_SHIFT;
|
||||
struct page **local = kvcalloc(npages, sizeof(*local),
|
||||
GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
|
||||
struct page **local = kvcalloc(npages, sizeof(*local), GFP_KERNEL);
|
||||
u32 page_size, align;
|
||||
u64 len = size;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2002,2007-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
|
@ -1000,7 +1000,7 @@ static int kgsl_system_alloc_pages(u64 size, struct page ***pages,
|
|||
struct page **local;
|
||||
int i, npages = size >> PAGE_SHIFT;
|
||||
|
||||
local = kvcalloc(npages, sizeof(*pages), GFP_KERNEL | __GFP_NORETRY);
|
||||
local = kvcalloc(npages, sizeof(*pages), GFP_KERNEL);
|
||||
if (!local)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue