On 11/25/24 22:01, Matthew Wilcox (Oracle) wrote: > In preparation for allocating frozen pages, stop initialising the page > refcount in get_page_from_freelist(). > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx> but there's a bug introduced, probably lasting only until a later patch > @@ -4002,6 +4004,7 @@ __alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order, > drained = true; > goto retry; > } > + set_page_refcounted(page); this needs to be "if (page)", the "if" above isn't enough to rule NULL out. > out: > psi_memstall_leave(&pflags); >