]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fix 32-bit compatability with sendmsg/recvmsg
authorJens Axboe <axboe@kernel.dk>
Thu, 27 Feb 2020 21:17:49 +0000 (14:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:17 +0000 (16:45 +0100)
commitf0c6b2b4efc1578b0bd5e86d04d5c802e6d2100e
tree9af49db7f52e6bf8ffb4aa89db710d313abf6225
parent473f1a9496a1871ab855be5f959684f1dea86bb0
io_uring: fix 32-bit compatability with sendmsg/recvmsg

commit d876836204897b6d7d911f942084f69a1e9d5c4d upstream.

We must set MSG_CMSG_COMPAT if we're in compatability mode, otherwise
the iovec import for these commands will not do the right thing and fail
the command with -EINVAL.

Found by running the test suite compiled as 32-bit.

Cc: stable@vger.kernel.org
Fixes: aa1fa28fc73e ("io_uring: add support for recvmsg()")
Fixes: 0fa03c624d8f ("io_uring: add support for sendmsg()")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c