Re: [PATCH] mm/page_alloc: Fix try_alloc_pages
From: Michal Hocko
Date: Tue Apr 01 2025 - 04:42:26 EST
On Mon 31-03-25 20:23:36, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@xxxxxxxxxx>
>
> Fix an obvious bug. try_alloc_pages() should set_page_refcounted.
>
> Fixes: 97769a53f117 ("mm, bpf: Introduce try_alloc_pages() for opportunistic page allocation")
> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> ---
>
> As soon as I fast forwarded and rerun the tests the bug was
> seen immediately.
> I'm completely baffled how I managed to lose this hunk.
> I'm pretty sure I manually tested various code paths of
> trylock logic with CONFIG_DEBUG_VM=y.
> Pure incompetence :(
I believe Vlastimil is right. This seems to be an unfortunate mismatch
in the final tree when this got merged.
--
Michal Hocko
SUSE Labs