projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c68826
)
io_uring: fix io_drain_req()
author
Pavel Begunkov
<asml.silence@gmail.com>
Sun, 11 Jul 2021 21:41:13 +0000
(22:41 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Sun, 11 Jul 2021 22:39:06 +0000
(16:39 -0600)
io_drain_req() return whether the request has been consumed or not, not
an error code. Fix a stupid mistake slipped from optimisation patches.
Reported-by: syzbot+ba6fcd859210f4e9e109@syzkaller.appspotmail.com
Fixes: 76cc33d79175a ("io_uring: refactor io_req_defer()")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/4d3c53c4274ffff307c8ae062fc7fda63b978df2.1626039606.git.asml.silence@gmail.com
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 118215211bb2baeb1a3bce26990b51920ada09f6..0cac361bf6b8de27cb5e16cf4a0a4d757219f198 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-6019,11
+6019,13
@@
static bool io_drain_req(struct io_kiocb *req)
ret = io_req_prep_async(req);
if (ret)
-
return ret
;
+
goto fail
;
io_prep_async_link(req);
de = kmalloc(sizeof(*de), GFP_KERNEL);
if (!de) {
- io_req_complete_failed(req, -ENOMEM);
+ ret = -ENOMEM;
+fail:
+ io_req_complete_failed(req, ret);
return true;
}