summaryrefslogtreecommitdiff
path: root/drivers/android
diff options
context:
space:
mode:
authorSherry Yang <sherryy@android.com>2017-10-21 03:58:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-21 11:14:20 +0300
commitae65c8510f3319dfb2114cc48d476b81232e27b3 (patch)
tree3a94ab0f22bdab90c95d824b0d736b294c467233 /drivers/android
parenta0c2baaf81bd53dc76fccdddc721ba7dbb62be21 (diff)
downloadlinux-ae65c8510f3319dfb2114cc48d476b81232e27b3.tar.xz
android: binder: Fix null ptr dereference in debug msg
Don't access next->data in kernel debug message when the next buffer is null. Acked-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Sherry Yang <sherryy@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android')
-rw-r--r--drivers/android/binder_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index e12072b1d507..c2819a3d58a6 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -560,7 +560,7 @@ static void binder_delete_free_buffer(struct binder_alloc *alloc,
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
"%d: merge free, buffer %pK do not share page with %pK or %pK\n",
alloc->pid, buffer->data,
- prev->data, next->data);
+ prev->data, next ? next->data : NULL);
binder_update_page_range(alloc, 0, buffer_start_page(buffer),
buffer_start_page(buffer) + PAGE_SIZE,
NULL);