Skip to content

Commit bcda4a7

Browse files
Sherry Yangpundiramit
authored andcommitted
FROMLIST: android: binder: Fix null ptr dereference in debug msg
(from https://patchwork.kernel.org/patch/9990323/) Don't access next->data in kernel debug message when the next buffer is null. Bug: 36007193 Change-Id: Ib8240d7e9a7087a2256e88c0ae84b9df0f2d0224 Acked-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Sherry Yang <sherryy@android.com>
1 parent 79afe6e commit bcda4a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/android/binder_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ static void binder_delete_free_buffer(struct binder_alloc *alloc,
561561
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
562562
"%d: merge free, buffer %pK do not share page with %pK or %pK\n",
563563
alloc->pid, buffer->data,
564-
prev->data, next->data);
564+
prev->data, next ? next->data : NULL);
565565
binder_update_page_range(alloc, 0, buffer_start_page(buffer),
566566
buffer_start_page(buffer) + PAGE_SIZE);
567567
}

0 commit comments

Comments
 (0)