projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
009bd55
)
io_uring: break links on shutdown failure
author
Jens Axboe
<axboe@kernel.dk>
Tue, 15 Dec 2020 03:57:27 +0000
(20:57 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 16 Dec 2020 21:56:36 +0000
(14:56 -0700)
Ensure that the return value of __sys_shutdown_sock() is used to
potentially break links to the request, if we fail.
Fixes: 36f4fa6886a8 ("io_uring: add support for shutdown(2)")
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 6f9392c35eefd6be6273c3f05d945a39d34b3ff4..6a4560c9ed9ac65c91a734ed11fe9956f38b5f02 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-3784,6
+3784,8
@@
static int io_shutdown(struct io_kiocb *req, bool force_nonblock)
return -ENOTSOCK;
ret = __sys_shutdown_sock(sock, req->shutdown.how);
+ if (ret < 0)
+ req_set_fail_links(req);
io_req_complete(req, ret);
return 0;
#else