On Mon, Oct 03, 2022 at 02:45:47PM -0700, Mike Kravetz wrote: > This also explains why the new locking exposes the race. > hugetlb_change_protection needs to take the i_mmap_sema in write mode because > it could unshare pmds. Previously, hugetlb page faults took i_mmap_sema in > read mode so this race could not happen. Makes sense, thanks for explaining. -- Peter Xu