We should never return -ERESTARTSYS to userspace, transform it into
-EINTR.
Cc: stable@xxxxxxxxxxxxxxx # v5.3+
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
---
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);
--
Jens Axboe