diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-02-08 13:28:02 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-02-08 13:07:00 -0700 |
commit | 5f798beaf35d79355cbf18019c1993a84475a2c3 (patch) | |
tree | 8330871ba880f98c2b34ad69248b0f0849f68b2a /fs/io-wq.c | |
parent | a93b33312f63ef6d5997f45d6fdf4de84c5396cc (diff) | |
download | lwn-5f798beaf35d79355cbf18019c1993a84475a2c3.tar.gz lwn-5f798beaf35d79355cbf18019c1993a84475a2c3.zip |
io_uring: fix double prep iovec leak
Requests may be prepared multiple times with ->io allocated (i.e. async
prepared). Preparation functions don't handle it and forget about
previously allocated resources. This may happen in case of:
- spurious defer_check
- non-head (i.e. async prepared) request executed in sync (via nxt).
Make the handlers check, whether they already allocated resources, which
is true IFF REQ_F_NEED_CLEANUP is set.
Cc: stable@vger.kernel.org # 5.5
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
0 files changed, 0 insertions, 0 deletions