Commit 441cdbd5 authored by Jens Axboe's avatar Jens Axboe

io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR

We should never return -ERESTARTSYS to userspace, transform it into
-EINTR.

Cc: stable@vger.kernel.org # v5.3+
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0b8c0ec7
...@@ -1917,6 +1917,8 @@ static int io_send_recvmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe, ...@@ -1917,6 +1917,8 @@ static int io_send_recvmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe,
ret = fn(sock, msg, flags); ret = fn(sock, msg, flags);
if (force_nonblock && ret == -EAGAIN) if (force_nonblock && ret == -EAGAIN)
return ret; return ret;
if (ret == -ERESTARTSYS)
ret = -EINTR;
} }
io_cqring_add_event(req, ret); io_cqring_add_event(req, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment