io_uring: fix memory leak of uid in files registration
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 25 Mar 2022 16:36:31 +0000 (16:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:42 +0000 (14:40 +0200)
commitb27de7011cb3ba14b047be2cee0ed8278368665b
tree094786fe1964147f309039155c3efa85f5fd47dd
parent20499ed3c0411768912ac7f24a29ad3981b0d80b
io_uring: fix memory leak of uid in files registration

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