[lkml]   [2017]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm: Respect FOLL_FORCE/FOLL_COW for thp
>> @@ -783,7 +793,7 @@ struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr,
>> assert_spin_locked(pmd_lockptr(mm, pmd));
>> - if (flags & FOLL_WRITE && !pmd_write(*pmd))
>> + if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags))
>> return NULL;
> I don't think this part is needed: once we COW devmap PMD entry, we split
> it into PTE table, so IIUC we never get here with PMD.
> Maybe we should WARN_ONCE() if have FOLL_COW here.

Sounds good to me. As I said, I don't have a testcase for this code
path, I just noticed the same pattern.
Will send an updated patch with the WARN_ONCE there.

 \ /
  Last update: 2017-01-05 22:07    [from the cache]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site