Re: [PATCH] userfaultfd: fix return error if mmap_changing is non-zero in MOVE ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 17, 2024 at 2:39 PM Lokesh Gidra <lokeshgidra@xxxxxxxxxx> wrote:
>
> To be consistent with other uffd ioctl's returning EAGAIN when
> mmap_changing is detected, we should change UFFDIO_MOVE to do the same.
>
> Signed-off-by: Lokesh Gidra <lokeshgidra@xxxxxxxxxx>

Looks correct. Thanks for catching it!

Acked-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

> ---
>  fs/userfaultfd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
> --
> 2.43.0.429.g432eaa2c6b-goog
>





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux