diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-14 22:26:55 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-14 22:26:55 +0300 |
commit | decd6167bf4f6bec1284006d0522381b44660df3 (patch) | |
tree | 40de7c0a7f285336e1c380ab6673cd133685a8c9 /mm/gup.c | |
parent | 8c1684bb81f173543599f1848c29a2a3b1ee5907 (diff) | |
parent | 13cf04880235cd70d408d70426ada31408ded2ee (diff) | |
download | linux-decd6167bf4f6bec1284006d0522381b44660df3.tar.xz |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
"7 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
kasan: add missing functions declarations to kasan.h
kasan: consistently disable debugging features
ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
userfaultfd: fix remap event with MREMAP_DONTUNMAP
mm/gup: fix fixup_user_fault() on multiple retries
epoll: call final ep_events_available() check under the lock
mm, memcg: fix inconsistent oom event behavior
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1218,6 +1218,10 @@ retry: if (!vma_permits_fault(vma, fault_flags)) return -EFAULT; + if ((fault_flags & FAULT_FLAG_KILLABLE) && + fatal_signal_pending(current)) + return -EINTR; + ret = handle_mm_fault(vma, address, fault_flags); major |= ret & VM_FAULT_MAJOR; if (ret & VM_FAULT_ERROR) { @@ -1230,11 +1234,9 @@ retry: if (ret & VM_FAULT_RETRY) { down_read(&mm->mmap_sem); - if (!(fault_flags & FAULT_FLAG_TRIED)) { - *unlocked = true; - fault_flags |= FAULT_FLAG_TRIED; - goto retry; - } + *unlocked = true; + fault_flags |= FAULT_FLAG_TRIED; + goto retry; } if (tsk) { |