On Sat, Jan 20, 2024 at 02:57:29PM +0800, Miaohe Lin wrote: > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index 636280d04008..20058f7ac3e9 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -1377,8 +1377,13 @@ void ClearPageHWPoisonTakenOff(struct page *page) > */ > static inline bool HWPoisonHandlable(struct page *page, unsigned long flags) > { > - /* Soft offline could migrate non-LRU movable pages */ > - if ((flags & MF_SOFT_OFFLINE) && __PageMovable(page)) > + /* > + * Soft offline could migrate non-LRU movable pages. > + * Note that page->mapping is overloaded with slab->slab_list or slabs > + * fields which might make slab pages appear like non-LRU movable pages. > + * So __PageMovable() has to be done after PageSlab() is checked. > + */ > + if ((flags & MF_SOFT_OFFLINE) && !PageSlab(page) && __PageMovable(page)) > return true; > > return PageLRU(page) || is_free_buddy_page(page); I think would make more sense as + if (PageSlab(page)) + return false; ... and then leave the rest alone (including not touching the comment)