projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efe68c1
)
io_uring: use kvfree() in io_sqe_buffer_register()
author
Denis Efremov
<efremov@linux.com>
Fri, 5 Jun 2020 09:32:03 +0000
(12:32 +0300)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 8 Jun 2020 15:39:13 +0000
(09:39 -0600)
Use kvfree() to free the pages and vmas, since they are allocated by
kvmalloc_array() in a loop.
Fixes:
d4ef647510b1
("io_uring: avoid page allocation warnings")
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org
Link:
https://lore.kernel.org/r/20200605093203.40087-1-efremov@linux.com
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index
5431b18
..
5e36e78
100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-7171,8
+7171,8
@@
static int io_sqe_buffer_register(struct io_ring_ctx *ctx, void __user *arg,
ret = 0;
if (!pages || nr_pages > got_pages) {
- kfree(vmas);
- kfree(pages);
+ k
v
free(vmas);
+ k
v
free(pages);
pages = kvmalloc_array(nr_pages, sizeof(struct page *),
GFP_KERNEL);
vmas = kvmalloc_array(nr_pages,