Skip to content

Commit 6ca03f1

Browse files
SENSEIIIIIakpm00
authored andcommitted
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]>
1 parent a9117b4 commit 6ca03f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/userfaultfd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ static int userfaultfd_move(struct userfaultfd_ctx *ctx,
20472047
ret = move_pages(ctx, mm, uffdio_move.dst, uffdio_move.src,
20482048
uffdio_move.len, uffdio_move.mode);
20492049
else
2050-
ret = -EINVAL;
2050+
ret = -EAGAIN;
20512051

20522052
mmap_read_unlock(mm);
20532053
mmput(mm);

0 commit comments

Comments
 (0)