OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b8c0ec
)
io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR
author
Jens Axboe
<axboe@kernel.dk>
Tue, 3 Dec 2019 01:49:10 +0000
(18:49 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 3 Dec 2019 01:49:10 +0000
(18:49 -0700)
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>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index
5cab7a0
..
a91743e
100644
(file)
--- 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);