Re: [PATCH v3 2/2] mm: wrap __find_buddy_pfn() with a necessary buddy page validation.

From: Vlastimil Babka
Date: Mon Apr 04 2022 - 03:42:56 EST


On 4/2/22 01:08, Zi Yan wrote:
> From: Zi Yan <ziy@xxxxxxxxxx>
>
> Whenever the buddy of a page is found from __find_buddy_pfn(),
> page_is_buddy() should be used to check its validity. Add a helper
> function find_buddy_page_pfn() to find the buddy page and do the check
> together.
>
> Suggested-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/linux-mm/CAHk-=wji_AmYygZMTsPMdJ7XksMt7kOur8oDfDdniBRMjm4VkQ@xxxxxxxxxxxxxx/
> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

Thanks.