]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: Fix leaked shadow_req
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 27 Oct 2019 19:10:36 +0000 (22:10 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 28 Oct 2019 03:29:18 +0000 (21:29 -0600)
commite78c120f47c92b52a0be0b9a2dbdbc6506755981
tree94a5f93471b51d76560dfef1c66059d076f05394
parentab8b627918f1ee6f3ea88e86af1a954037dbaa93
io_uring: Fix leaked shadow_req

io_queue_link_head() owns shadow_req after taking it as an argument.
By not freeing it in case of an error, it can leak the request along
with taken ctx->refs.

Reviewed-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c