Re: [PATCH] mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory
From: Andrew Morton
Date: Sun Dec 01 2024 - 01:59:59 EST
On Mon, 5 Aug 2024 14:25:14 +0800 Miaohe Lin <linmiaohe@xxxxxxxxxx> wrote:
> >>>> Yup, this will be a good alternative. But will it be better to simply check PagePoisoned() instead?
> >>>
> >>> The memmap of offline memory sections shall not be touched, so .... don't touch it ;)
> >>>
> >>> Especially because that PagePoisoned() check is non-sensical without poisoining-during-memmap-init. You would still work with memory in offline sections.
> >>>
> >>> I think the code is even wrong in that regard: we allow for memory offlining to work with HWPoisoned pages, see __offline_isolated_pages(). Staring at unpoison_memory(), we might be putting these pages back to the buddy? Which is completely wrong.
> >>
> >> I agree with you. Thanks for detailed explanation. :)
> >> Thanks David.
> >
> > So ... I assume there will be a new patch? :)
>
> I was just back from my two-weeks holidays. ;) I will try to send a new version when possible.
Maybe I missed the v2. I'll drop this v1 patch.