* + hugetlb-pass-head-page-to-remove_hugetlb_page.patch added to -mm tree
@ 2021-05-27 0:09 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-27 0:09 UTC (permalink / raw)
To: linmiaohe, mhocko, mike.kravetz, mm-commits, naoya.horiguchi,
osalvador, songmuchun
The patch titled
Subject: hugetlb: pass head page to remove_hugetlb_page()
has been added to the -mm tree. Its filename is
hugetlb-pass-head-page-to-remove_hugetlb_page.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/hugetlb-pass-head-page-to-remove_hugetlb_page.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/hugetlb-pass-head-page-to-remove_hugetlb_page.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Naoya Horiguchi <naoya.horiguchi@nec.com>
Subject: hugetlb: pass head page to remove_hugetlb_page()
When memory_failure() or soft_offline_page() is called on a tail page of
some hugetlb page, "BUG: unable to handle page fault" error can be
triggered.
remove_hugetlb_page() dereferences page->lru, so it's assumed that the
page points to a head page, but one of the caller,
dissolve_free_huge_page(), provides remove_hugetlb_page() with 'page'
which could be a tail page. So pass 'head' to it, instead.
Link: https://lkml.kernel.org/r/20210526235257.2769473-1-nao.horiguchi@gmail.com
Fixes: 6eb4e88a6d27 ("hugetlb: create remove_hugetlb_page() to separate functionality")
Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/hugetlb.c~hugetlb-pass-head-page-to-remove_hugetlb_page
+++ a/mm/hugetlb.c
@@ -1832,7 +1832,7 @@ retry:
SetPageHWPoison(page);
ClearPageHWPoison(head);
}
- remove_hugetlb_page(h, page, false);
+ remove_hugetlb_page(h, head, false);
h->max_huge_pages--;
spin_unlock_irq(&hugetlb_lock);
update_and_free_page(h, head);
_
Patches currently in -mm which might be from naoya.horiguchi@nec.com are
hugetlb-pass-head-page-to-remove_hugetlb_page.patch
mmhwpoison-send-sigbus-with-error-virutal-address.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-27 0:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 0:09 + hugetlb-pass-head-page-to-remove_hugetlb_page.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).