lkml.org 
[lkml]   [2020]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/hugetlbfs: fix for_each_hstate() loop in init_hugetlbfs_fs()
From
Date
On 1/3/20 9:37 AM, Jan Stancek wrote:
> LTP memfd_create04 started failing for some huge page sizes
> after v5.4-10135-gc3bfc5dd73c6.
>
> Problem is check introduced to for_each_hstate() loop that should
> skip default_hstate_idx. Since it doesn't update 'i' counter, all
> subsequent huge page sizes are skipped as well.
>
> Fixes: 8fc312b32b25 ("mm/hugetlbfs: fix error handling when setting up mounts")
> Signed-off-by: Jan Stancek <jstancek@redhat.com>

Thank you Jan!

My apologies for a relatively obvious bug. Testing on x86 did not catch this
as the default hstate is set up last in the list. Not an excuse, but that is
why I missed it. :(

Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz

\
 
 \ /
  Last update: 2020-01-03 18:51    [W:0.037 / U:3.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site