aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/android/ion/ion_heap.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2013-12-16 21:07:52 -0800
committerColin Cross <ccross@android.com>2013-12-19 19:25:38 -0800
commit60e11dfc002962181fe4f0db54b33c65fee02c52 (patch)
treeb4555636ebbc20ea6cc8f0798ecddcc3df9c3b3f /drivers/staging/android/ion/ion_heap.c
parentd232ba2bea468a7d12d826d0fe62b3f8a9ba8d10 (diff)
staging: ion: Fix possible null pointer dereference
The kbuild test robot reported: drivers/staging/android/ion/ion_system_heap.c:122 alloc_largest_available() error: potential null dereference 'info'. (kmalloc returns null) Where the pointer returned from kmalloc goes unchecked for failure. This patch checks the return for NULL, and reworks the logic, as suggested by Colin, so we allocate the page_info structure first. Acked-by: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion/ion_heap.c')
0 files changed, 0 insertions, 0 deletions