[lkml]   [2022]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 2/9] mm/hugetlb: separate path for hwpoison entry in copy_hugetlb_page_range()
On 06/24/22 08:51, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <>
> Originally copy_hugetlb_page_range() handles migration entries and hwpoisone
> entries in similar manner. But recently the related code path has more code
> for migration entries, and when is_writable_migration_entry() was converted
> to !is_readable_migration_entry(), hwpoison entries on source processes got
> to be unexpectedly updated (which is legitimate for migration entries, but
> not for hwpoison entries). This results in unexpected serious issues like
> kernel panic when foking processes with hwpoison entries in pmd.
> Separate the if branch into one for hwpoison entries and one for migration
> entries.
> Fixes: 6c287605fd56 ("mm: remember exclusively mapped anonymous pages with PG_anon_exclusive")
> Signed-off-by: Naoya Horiguchi <>
> Cc: <> # 5.18
> ---
> mm/hugetlb.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)

Thank you!

Reviewed-by: Mike Kravetz <>
(with typos pointed out by Miaohe Lin)

Just curious, are there any hwpoisoned tests in any test suite? I run
libhugetlbfs tests and ltp on a regular basis which sometimes catch
regressions. If there are no tests in any suite today, this might be
something we want to consider for future work.

Mike Kravetz

 \ /
  Last update: 2022-06-24 22:59    [W:0.224 / U:5.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site