diff options
| author | Dave Airlie <airlied@redhat.com> | 2022-11-24 11:05:43 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2022-11-24 11:05:43 +1000 |
| commit | d47f9580839eb6fe568e38b2084d94887fbf5ce0 (patch) | |
| tree | 2493555057f8e5c850590d7438fdbf4472666201 /include/linux/userfaultfd_k.h | |
| parent | 3d335a523b938a445a674be24d1dd5c7a4c86fb6 (diff) | |
| parent | eb7081409f94a9a8608593d0fb63a1aa3d6f95d8 (diff) | |
Backmerge tag 'v6.1-rc6' into drm-next
Linux 6.1-rc6
This is needed for drm-misc-next and tegra.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/userfaultfd_k.h')
| -rw-r--r-- | include/linux/userfaultfd_k.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h index f07e6998bb68..9df0b9a762cc 100644 --- a/include/linux/userfaultfd_k.h +++ b/include/linux/userfaultfd_k.h @@ -146,9 +146,9 @@ static inline bool userfaultfd_armed(struct vm_area_struct *vma) static inline bool vma_can_userfault(struct vm_area_struct *vma, unsigned long vm_flags) { - if (vm_flags & VM_UFFD_MINOR) - return is_vm_hugetlb_page(vma) || vma_is_shmem(vma); - + if ((vm_flags & VM_UFFD_MINOR) && + (!is_vm_hugetlb_page(vma) && !vma_is_shmem(vma))) + return false; #ifndef CONFIG_PTE_MARKER_UFFD_WP /* * If user requested uffd-wp but not enabled pte markers for |
