patch "staging: android: ion: Return an ERR_PTR in ion_map_kernel" added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: android: ion: Return an ERR_PTR in ion_map_kernel
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
0a2bc00341dcfcc793c0dbf4f8d43adf60458b05Mon Sep 17 00:00:00 2001
From: Laura Abbott <[email protected]>
Date: Mon, 11 Jun 2018 11:06:53 -0700
Subject: staging: android: ion: Return an ERR_PTR in ion_map_kernel
The expected return value from ion_map_kernel is an ERR_PTR. The error path for a vmalloc failure currently just returns NULL, triggering a warning in ion_buffer_kmap_get. Encode the vmalloc failure as an ERR_PTR.
--- drivers/staging/android/ion/ion_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_heap.c +1 -1
@@ -30,7 +30,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap,struct page **tmp = pages;if (!pages) -return NULL ; +return ERR_PTR (-ENOMEM );if (buffer->flags &ION_FLAG_CACHED ) pgprot =PAGE_KERNEL ;
Signature · 1 line
2.18.0