android: ion: add checking of returned page
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Wed, 28 Feb 2018 08:11:52 +0000 (17:11 +0900)
committerSangwook Ju <sw.ju@samsung.com>
Mon, 14 May 2018 10:45:24 +0000 (19:45 +0900)
commit134f2c4af1b3e81671022c1095bfcdbf7a78a566
tree534204423b993b59fd3a2dcf0b9b10e1346de9b2
parentf55d679d328c4ea4960d20f6d7648299fad0bba2
android: ion: add checking of returned page

This patch added checking code to avoid invalid address access for cache
operation.
ion_page_pool_alloc_pages() might return NULL when alloc_pages() could
not get enough pages as requested order, especially in high-order case.

Change-Id: I7aa2bb08f32f523f5b76930b46c0f47d3457895b
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
drivers/staging/android/ion/ion_page_pool.c