diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-12-02 18:49:10 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-12-02 18:49:10 -0700 |
commit | 441cdbd5449b4923cd413d3ba748124f91388be9 (patch) | |
tree | 1eaafe0c65ca80c013c09d04628ad78cf98f8113 | |
parent | 0b8c0ec7eedcd8f9f1a1f238d87f9b512b09e71a (diff) |
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: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 5cab7a047317..a91743e1fa2c 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1917,6 +1917,8 @@ static int io_send_recvmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe, ret = fn(sock, msg, flags); if (force_nonblock && ret == -EAGAIN) return ret; + if (ret == -ERESTARTSYS) + ret = -EINTR; } io_cqring_add_event(req, ret); |