projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2a7cc3
)
io_uring: fix invalid error check after malloc
author
Pavel Begunkov
<asml.silence@gmail.com>
Sun, 25 Apr 2021 23:16:31 +0000
(
00:16
+0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 26 Apr 2021 12:50:35 +0000
(06:50 -0600)
Now we allocate io_mapped_ubuf instead of bvec, so we clearly have to
check its address after allocation.
Fixes: 41edf1a5ec967 ("io_uring: keep table of pointers to ubufs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/d28eb1bc4384284f69dbce35b9f70c115ff6176f.1619392565.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 eef373394ee9f821ee98070d0311867ac7e5258f..b65a25384019bb27a3abec13a6d3bfd0276d6c41 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-8265,7
+8265,7
@@
static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov,
goto done;
imu = kvmalloc(struct_size(imu, bvec, nr_pages), GFP_KERNEL);
- if (!imu
->bvec
)
+ if (!imu)
goto done;
ret = 0;