diff options
| author | Lokesh Gidra <[email protected]> | 2024-01-17 14:39:21 -0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-02-22 10:24:38 -0800 |
| commit | 6ca03f1bb5a7427a66df62c954b3500a4255cdb9 (patch) | |
| tree | 8c6b65cd1163536f5b6b8a39daf2be11309eaa78 | |
| parent | a9117b4d7f178ea36e8d256f8ab3752839e245b2 (diff) | |
userfaultfd: fix return error if mmap_changing is non-zero in MOVE ioctl
To be consistent with other uffd ioctl's returning EAGAIN when
mmap_changing is detected, we should change UFFDIO_MOVE to do the same.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Lokesh Gidra <[email protected]>
Acked-by: Suren Baghdasaryan <[email protected]>
Acked-by: Mike Rapoport (IBM) <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Axel Rasmussen <[email protected]>
Cc: Brian Geffon <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Kalesh Singh <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Nicolas Geoffray <[email protected]>
Cc: Peter Xu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
| -rw-r--r-- | fs/userfaultfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 959551ff9a95..05c8e8a05427 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -2047,7 +2047,7 @@ static int userfaultfd_move(struct userfaultfd_ctx *ctx, ret = move_pages(ctx, mm, uffdio_move.dst, uffdio_move.src, uffdio_move.len, uffdio_move.mode); else - ret = -EINVAL; + ret = -EAGAIN; mmap_read_unlock(mm); mmput(mm); |