summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-05 14:39:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-05 14:39:59 -0800
commit619ca2664cc6ebf6ecaff347d15ee8093b634e0c (patch)
tree6e22a2b32145d4a54361fe5606d9afa19ff8e077
parent32f741b02f1a84dd15cdaf74ea3c8d724f812318 (diff)
parent2d280bc8930ba9ed1705cfd548c6c8924949eaf1 (diff)
downloadlinux-619ca2664cc6ebf6ecaff347d15ee8093b634e0c.tar.bz2
Merge tag 'io_uring-5.10-2020-12-05' of git://git.kernel.dk/linux-block
Pull io_uring fix from Jens Axboe: "Just a small fix this time, for an issue with 32-bit compat apps and buffer selection with recvmsg" * tag 'io_uring-5.10-2020-12-05' of git://git.kernel.dk/linux-block: io_uring: fix recvmsg setup with compat buf-select
-rw-r--r--fs/io_uring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 1023f7b44cea..a2a7c65a77aa 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4499,7 +4499,8 @@ static int __io_compat_recvmsg_copy_hdr(struct io_kiocb *req,
return -EFAULT;
if (clen < 0)
return -EINVAL;
- sr->len = iomsg->iov[0].iov_len;
+ sr->len = clen;
+ iomsg->iov[0].iov_len = clen;
iomsg->iov = NULL;
} else {
ret = __import_iovec(READ, (struct iovec __user *)uiov, len,