Re: [PATCH v5 1/2] mm,hwpoison: fix race with hugetlb page allocation

From: Oscar Salvador
Date: Tue May 25 2021 - 03:36:17 EST


On Thu, May 20, 2021 at 07:17:17AM +0000, HORIGUCHI NAOYA(堀口 直也) wrote:
> So I think of inserting the check to comply with the assumption of
> get_hwpoison_huge_page() like below:
>
> ret = get_hwpoison_huge_page(head, &hugetlb);
> if (hugetlb)
> return ret;
>
> if (!PageLRU(head) && !__PageMovable(head))
> return 0;
>
> if (PageTransHuge(head)) {
> ...
> }
>
> if (get_page_unless_zero(head)) {
> ...
> }
>
> return 0;

Hi Naoya,

would you mind posting a complete draft of what it would look like?
I am having a hard time picturing it.


Thanks

--
Oscar Salvador
SUSE L3