]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix ->work corruption with poll_add
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 24 Jul 2020 17:07:20 +0000 (20:07 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 18:51:33 +0000 (12:51 -0600)
commit24f17bd570e10fb9e193c6b2f4cd990a468a5a28
treeb386921fbd47c05693f732e95f19f90822d50805
parentfa7d3aa83b5c3efe2125949bb2a06eb656b98784
io_uring: fix ->work corruption with poll_add

req->work might be already initialised by the time it gets into
__io_arm_poll_handler(), which will corrupt it by using fields that are
in an union with req->work. Luckily, the only side effect is missing
put_creds(). Clean req->work before going there.

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