diff options
Diffstat (limited to 'fs/userfaultfd.c')
-rw-r--r-- | fs/userfaultfd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index b676575f2268..625b7285a37b 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -1607,6 +1607,8 @@ static int userfaultfd_copy(struct userfaultfd_ctx *ctx, ret = mcopy_atomic(ctx->mm, uffdio_copy.dst, uffdio_copy.src, uffdio_copy.len); mmput(ctx->mm); + } else { + return -ENOSPC; } if (unlikely(put_user(ret, &user_uffdio_copy->copy))) return -EFAULT; |