projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6224843
)
io_uring: fix unchecked error in switch_start()
author
Pavel Begunkov
<asml.silence@gmail.com>
Thu, 29 Apr 2021 10:46:48 +0000
(11:46 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 29 Apr 2021 19:26:19 +0000
(13:26 -0600)
io_rsrc_node_switch_start() can fail, don't forget to check returned
error code.
Reported-by: syzbot+a4715dd4b7c866136f79@syzkaller.appspotmail.com
Fixes: eae071c9b4cef ("io_uring: prepare fixed rw for dynanic buffers")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/c4c06e2f3f0c8e43bd8d0a266c79055bcc6b6e60.1619693112.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 47c2f126f885a424ff92bef5479dcaba9b0b8ef0..82117e6bf45d08359f05b6bf77ef353915b115f0 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-9627,7
+9627,9
@@
static int io_uring_create(unsigned entries, struct io_uring_params *p,
if (ret)
goto err;
/* always set a rsrc node */
- io_rsrc_node_switch_start(ctx);
+ ret = io_rsrc_node_switch_start(ctx);
+ if (ret)
+ goto err;
io_rsrc_node_switch(ctx, NULL);
memset(&p->sq_off, 0, sizeof(p->sq_off));