lkml.org 
[lkml]   [2023]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] hugetlbfs: close race between MADV_DONTNEED and page fault
From
Date
On Sun, 2023-10-01 at 21:39 -0700, Mike Kravetz wrote:
>
> Looks like vma->vm_file is NULL and __hugetlb_zap_begin is trying to
> do
> i_mmap_lock_write(vma->vm_file->f_mapping).
>
> Guess I did look closely. :)

Ugh. It looks like the fix for this bug ended up getting pulled
into patch 3, instead of patch 2. I've had it in my code for a
while now :/

Let me move the fix for this thing into patch 2.

void __hugetlb_zap_begin(struct vm_area_struct *vma,
unsigned long *start, unsigned long *end)
{
adjust_range_if_pmd_sharing_possible(vma, start, end);
hugetlb_vma_lock_write(vma);
if (vma->vm_file)
i_mmap_lock_write(vma->vm_file->f_mapping);
}


--
All Rights Reversed.

\
 
 \ /
  Last update: 2023-10-02 15:15    [W:0.076 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site