* [folded-merged] mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page-fix.patch removed from -mm tree
@ 2021-07-01 0:47 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-01 0:47 UTC (permalink / raw)
To: david, mhocko, mike.kravetz, mm-commits, naoya.horiguchi,
osalvador, songmuchun
The patch titled
Subject: mm: hugetlb: fix dissolve_free_huge_page use of tail/head page
has been removed from the -mm tree. Its filename was
mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page-fix.patch
This patch was dropped because it was folded into mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page.patch
------------------------------------------------------
From: Mike Kravetz <mike.kravetz@oracle.com>
Subject: mm: hugetlb: fix dissolve_free_huge_page use of tail/head page
The routine dissolve_free_huge_page can be passed the tail page of a
hugetlb page. The tail page is incorrectly passed on to the routines
alloc_huge_page_vmemmap and add_hugetlb_page which expect a hugetlb head
page.
Operating on a tail page instead of head page could result in addressing
exceptions or vmemmap corruption.
Link: https://lkml.kernel.org/r/20210527231225.226987-1-mike.kravetz@oracle.com
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/hugetlb.c~mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page-fix
+++ a/mm/hugetlb.c
@@ -1912,7 +1912,7 @@ retry:
* Attempt to allocate vmemmmap here so that we can take
* appropriate action on failure.
*/
- rc = alloc_huge_page_vmemmap(h, page);
+ rc = alloc_huge_page_vmemmap(h, head);
if (!rc) {
/*
* Move PageHWPoison flag from head page to the raw
@@ -1926,7 +1926,7 @@ retry:
update_and_free_page(h, head, false);
} else {
spin_lock_irq(&hugetlb_lock);
- add_hugetlb_page(h, page, false);
+ add_hugetlb_page(h, head, false);
h->max_huge_pages++;
spin_unlock_irq(&hugetlb_lock);
}
_
Patches currently in -mm which might be from mike.kravetz@oracle.com are
mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page.patch
hugetlb-remove-prep_compound_huge_page-cleanup.patch
hugetlb-address-ref-count-racing-in-prep_compound_gigantic_page.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-01 0:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 0:47 [folded-merged] mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page-fix.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.