Re: [PATCH v3 06/15] mm/page_alloc: Move set_page_refcounted() to callers of get_page_from_freelist()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
>  




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux