]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix potential use after free on fallback request free
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 29 Jun 2020 10:13:03 +0000 (13:13 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Jun 2020 14:39:59 +0000 (08:39 -0600)
commit8ad99980f997f0cdeeef7a0bc818efaf0ebf7b21
tree60ebb91b5fb2e09fb274d9e0d8db2c47128029a6
parent71518c9a49d71fd723c77af0fb9b7d49d52dec46
io_uring: fix potential use after free on fallback request free

After __io_free_req() puts a ctx ref, it should be assumed that the ctx
may already be gone. However, it can be accessed when putting the
fallback req. Free the req first and then put the ctx.

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