Re: [PATCH] hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem

2020-08-03 Thread Mike Kravetz
g the parameters passed to huge_pmd_unshare. Verified that the problematic call to huge_pte_alloc (that this patch also removes) will generate WARNINGs. Not sure if the fix should be separated from the verification code for sending to stable? >From 8d1d4f858da7a593a04ce8dc06b067bf0075903f Mon Se

Re: [PATCH] hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem

2020-08-03 Thread Mike Kravetz
On 8/3/20 3:52 PM, Matthew Wilcox wrote: > On Mon, Aug 03, 2020 at 03:43:35PM -0700, Mike Kravetz wrote: >> Commit c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing >> synchronization") requires callers of huge_pte_alloc to hold i_mmap_rwsem >> in at least read mode. This is because

Re: [PATCH] hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem

2020-08-03 Thread Matthew Wilcox
On Mon, Aug 03, 2020 at 03:43:35PM -0700, Mike Kravetz wrote: > Commit c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing > synchronization") requires callers of huge_pte_alloc to hold i_mmap_rwsem > in at least read mode. This is because the explicit locking in > huge_pmd_share

[PATCH] hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem

2020-08-03 Thread Mike Kravetz
Commit c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization") requires callers of huge_pte_alloc to hold i_mmap_rwsem in at least read mode. This is because the explicit locking in huge_pmd_share (called by huge_pte_alloc) was removed. When restructuring the code, the