public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR
@ 2019-12-03  2:51 Jens Axboe
  0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2019-12-03  2:51 UTC (permalink / raw)
  To: io-uring

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

Cc: [email protected] # v5.3+
Signed-off-by: Jens Axboe <[email protected]>

---

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-03  2:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-03  2:51 [PATCH] io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox