summaryrefslogtreecommitdiff
path: root/arch/arm64
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2018-12-14 14:17:17 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-21 14:13:04 +0100
commitb99eaefb6850b38abdd8a2029bbfde08170ec6c9 (patch)
tree3fd8ff53b36338f0ba3d7eeea7b00bb6f199d344 /arch/arm64
parent5f4610fe2ed4351b45c0d82b3246f18b886d26f9 (diff)
userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered
commit 01e881f5a1fca4677e82733061868c6d6ea05ca7 upstream. Calling UFFDIO_UNREGISTER on virtual ranges not yet registered in uffd could trigger an harmless false positive WARN_ON. Check the vma is already registered before checking VM_MAYWRITE to shut off the false positive warning. Link: http://lkml.kernel.org/r/20181206212028.18726-2-aarcange@redhat.com Cc: <stable@vger.kernel.org> Fixes: 29ec90660d68 ("userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas") Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Reported-by: syzbot+06c7092e7d71218a2c16@syzkaller.appspotmail.com Acked-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Hugh Dickins <hughd@google.com> Acked-by: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64')
0 files changed, 0 insertions, 0 deletions