Re: [PATCH] lib/test_meminit: fix off-by-one error in test_pages()

From: Greg Kroah-Hartman
Date: Thu Oct 12 2023 - 06:27:08 EST


On Thu, Oct 12, 2023 at 10:40:14AM +0200, Alexander Potapenko wrote:
> On Thu, Oct 12, 2023 at 10:17 AM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > In commit efb78fa86e95 ("lib/test_meminit: allocate pages up to order
> > MAX_ORDER"), the loop for testing pages is set to "<= MAX_ORDER" which
> > causes crashes in systems when run. Fix this to "< MAX_ORDER" to fix
> > the test to work properly.
>
> What are the crashes you are seeing? Are those OOMs?

They are WARN_ON() triggers. They are burried in the Android build
system, let me see if I can uncover them.

> IIUC it should be valid to allocate with MAX_ORDER.

"should", but I no longer get runtime warnings with this patch applied,
so something is wrong :)

Let me go dig for the logs again...