Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

binder: Fix selftest page indexing

The binder allocator selftest was only checking the last page of buffers
that ended on a page boundary. Correct the page indexing to account for
buffers that are not page-aligned.

Signed-off-by: Tiffany Yang <ynaffit@google.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20250714185321.2417234-2-ynaffit@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tiffany Yang and committed by
Greg Kroah-Hartman
bea3e7bf 01afddca

+1 -1
+1 -1
drivers/android/binder_alloc_selftest.c
··· 142 142 for (i = 0; i < BUFFER_NUM; i++) 143 143 binder_alloc_free_buf(alloc, buffers[seq[i]]); 144 144 145 - for (i = 0; i < end / PAGE_SIZE; i++) { 146 145 /** 147 146 * Error message on a free page can be false positive 148 147 * if binder shrinker ran during binder_alloc_free_buf 149 148 * calls above. 150 149 */ 150 + for (i = 0; i <= (end - 1) / PAGE_SIZE; i++) { 151 151 if (list_empty(page_to_lru(alloc->pages[i]))) { 152 152 pr_err_size_seq(sizes, seq); 153 153 pr_err("expect lru but is %s at page index %d\n",