aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorMike Rapoport <[email protected]>2018-08-02 22:36:09 +0000
committerLinus Torvalds <[email protected]>2018-08-02 23:03:40 +0000
commit31e810aa1033a7db50a2746cd34a2432237f6420 (patch)
tree54907b7acfdd32910f2ea58912a4b78bbaabaad5 /fs/btrfs/dev-replace.c
parentipc/shm.c add ->pagesize function to shm_vm_ops (diff)
downloadkernel-31e810aa1033a7db50a2746cd34a2432237f6420.tar.gz
kernel-31e810aa1033a7db50a2746cd34a2432237f6420.zip
userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
The fix in commit 0cbb4b4f4c44 ("userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails") cleared the vma->vm_userfaultfd_ctx but kept userfaultfd flags in vma->vm_flags that were copied from the parent process VMA. As the result, there is an inconsistency between the values of vma->vm_userfaultfd_ctx.ctx and vma->vm_flags which triggers BUG_ON in userfaultfd_release(). Clearing the uffd flags from vma->vm_flags in case of UFFD_EVENT_FORK failure resolves the issue. Link: http://lkml.kernel.org/r/[email protected] Fixes: 0cbb4b4f4c44 ("userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails") Signed-off-by: Mike Rapoport <[email protected]> Reported-by: [email protected] Cc: Andrea Arcangeli <[email protected]> Cc: Eric Biggers <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions