Re: bug report: hugetlbfs: use i_mmap_rwsem for more pmd sharing, synchronization

From: Mike Kravetz
Date: Fri Dec 28 2018 - 00:31:18 EST

On 12/27/18 6:45 PM, Andrew Morton wrote:
> On Thu, 27 Dec 2018 11:24:31 -0800 Mike Kravetz <mike.kravetz@xxxxxxxxxx> wrote:
>> It would be better to make an explicit check for mapping != null before
>> calling i_mmap_lock_write/try_to_unmap. In this way, unrelated changes to
>> code above will not potentially lead to the possibility of mapping == null.
>> I'm not sure what is the best way to handle this. Below is an updated version
>> of the patch sent to Andrew. I can also provide a simple patch to the patch
>> if that is easier.
> Below is the delta. Please check it. It seems to do more than the
> above implies.
> Also, I have notes here that
> hugetlbfs-use-i_mmap_rwsem-for-more-pmd-sharing-synchronization.patch
> and
> hugetlbfs-use-i_mmap_rwsem-to-fix-page-fault-truncate-race.patch
> have additional updates pending. Due to emails such as
> What's the status, please?

There was a V3 of the patches which was Acked-by Kirill. See,

The two V3 patches are:

The patch I sent in this thread was an update to the V3. The delta you
created was based on V2. So, the delta contains V2 -> V3 changes as well
as the changes mentioned in this thread. My apologies for not noticing
and clarifying.

Let me know what you would like me to do to help. I hate to send any
more patches right now as they might cause more confusion.
Mike Kravetz