projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b9ac37
)
io_uring: fix memory leak of uid in files registration
author
Pavel Begunkov
<asml.silence@gmail.com>
Fri, 25 Mar 2022 16:36:31 +0000
(16:36 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:24:12 +0000
(14:24 +0200)
commit
c86d18f4aa93e0e66cda0e55827cd03eea6bc5f8
upstream.
When there are no files for __io_sqe_files_scm() to process in the
range, it'll free everything and return. However, it forgets to put uid.
Fixes: 08a451739a9b5 ("io_uring: allow sparse fixed file sets")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/accee442376f33ce8aaebb099d04967533efde92.1648226048.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index ec0b50940405f9c7b4bef00d9eca91dde370ff6d..5fc3a62eae7228df0a69adb0027bbec8588acaa0 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-8130,6
+8130,7
@@
static int __io_sqe_files_scm(struct io_ring_ctx *ctx, int nr, int offset)
fput(fpl->fp[i]);
} else {
kfree_skb(skb);
+ free_uid(fpl->user);
kfree(fpl);
}