lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5.4 21/92] io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR
Date
From: Jens Axboe <axboe@kernel.dk>

commit 441cdbd5449b4923cd413d3ba748124f91388be9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
fs/io_uring.c | 2 ++
1 file changed, 2 insertions(+)

--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1667,6 +1667,8 @@ static int io_send_recvmsg(struct io_kio
ret = fn(sock, msg, flags);
if (force_nonblock && ret == -EAGAIN)
return ret;
+ if (ret == -ERESTARTSYS)
+ ret = -EINTR;
}

io_cqring_add_event(req->ctx, sqe->user_data, ret);

\
 
 \ /
  Last update: 2019-12-11 16:08    [W:0.217 / U:2.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site