OSDN Git Service

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)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Feb 2020 21:17:49 +0000 (14:17 -0700)
commitd876836204897b6d7d911f942084f69a1e9d5c4d
tree86e904e35ae5a6bdfea02665e869e0be78d7677b
parentbebdb65e077267957f48e43d205d4a16cc7b8161
io_uring: fix 32-bit compatability with sendmsg/recvmsg

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>
fs/io_uring.c