From: Tiffany Yang <ynaffit@google.com>
To: linux-kernel@vger.kernel.org
Cc: keescook@google.com, kernel-team@android.com,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Christian Brauner" <brauner@kernel.org>,
"Carlos Llamas" <cmllamas@google.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"Brendan Higgins" <brendan.higgins@linux.dev>,
"David Gow" <davidgow@google.com>, "Rae Moar" <rmoar@google.com>,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com
Subject: [PATCH 1/5] binder: Fix selftest page indexing
Date: Fri, 27 Jun 2025 13:37:42 -0700 [thread overview]
Message-ID: <20250627203748.881022-2-ynaffit@google.com> (raw)
In-Reply-To: <20250627203748.881022-1-ynaffit@google.com>
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>
---
drivers/android/binder_alloc_selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder_alloc_selftest.c b/drivers/android/binder_alloc_selftest.c
index c88735c54848..486af3ec3c02 100644
--- a/drivers/android/binder_alloc_selftest.c
+++ b/drivers/android/binder_alloc_selftest.c
@@ -142,12 +142,12 @@ static void binder_selftest_free_buf(struct binder_alloc *alloc,
for (i = 0; i < BUFFER_NUM; i++)
binder_alloc_free_buf(alloc, buffers[seq[i]]);
- for (i = 0; i < end / PAGE_SIZE; i++) {
/**
* Error message on a free page can be false positive
* if binder shrinker ran during binder_alloc_free_buf
* calls above.
*/
+ for (i = 0; i <= (end - 1) / PAGE_SIZE; i++) {
if (list_empty(page_to_lru(alloc->pages[i]))) {
pr_err_size_seq(sizes, seq);
pr_err("expect lru but is %s at page index %d\n",
--
2.50.0.727.gbf7dc18ff4-goog
next prev parent reply other threads:[~2025-06-27 20:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 20:37 [PATCH 0/5] binder: Set up KUnit tests for alloc Tiffany Yang
2025-06-27 20:37 ` Tiffany Yang [this message]
2025-06-27 20:37 ` [PATCH 2/5] binder: Store lru freelist in binder_alloc Tiffany Yang
2025-06-27 20:37 ` [PATCH 3/5] binder: Scaffolding for binder_alloc KUnit tests Tiffany Yang
2025-07-01 19:37 ` Rae Moar
2025-06-27 20:37 ` [PATCH 4/5] binder: Convert binder_alloc selftests to KUnit Tiffany Yang
2025-06-28 10:59 ` kernel test robot
2025-06-27 20:37 ` [PATCH 5/5] binder: encapsulate individual alloc test cases Tiffany Yang
2025-06-28 11:52 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250627203748.881022-2-ynaffit@google.com \
--to=ynaffit@google.com \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=brendan.higgins@linux.dev \
--cc=cmllamas@google.com \
--cc=davidgow@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=joelagnelf@nvidia.com \
--cc=keescook@google.com \
--cc=kernel-team@android.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maco@android.com \
--cc=rmoar@google.com \
--cc=surenb@google.com \
--cc=tkjos@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).