mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
drivers: staging: ion: fix error check in check_valid_vmid
check_valid_vmid makes an incorrect assumption on the return
value of ion_msm_page_pool_alloc causing an incorrect pointer
access later in ion_msm_page_pool_add.
Change-Id: I45dc78978385498366ba729b447ec365a31474d8
Fixes: cae595f476 ("ion: Check for valid vmids for msm system heap")
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
parent
2c8ec6785e
commit
2cc23e8e19
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
* ION Memory Allocator system heap exporter
|
||||
*
|
||||
* Copyright (C) 2011 Google, Inc.
|
||||
* Copyright (c) 2011-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ static bool check_valid_vmid(int dest_vmid, struct ion_msm_system_heap *sys_heap
|
|||
|
||||
page = ion_msm_page_pool_alloc(sys_heap->uncached_pools[order_ind],
|
||||
&from_pool);
|
||||
if (!page)
|
||||
if (IS_ERR(page))
|
||||
return false;
|
||||
|
||||
if (!from_pool)
|
||||
|
|
|
|||
Loading…
Reference in a new issue