Pavel Begunkov 99bc4c3853 io_uring: fix iovec leaks
Allocated iovec is freed only in io_{read,write,send,recv)(), and just
leaves it if an error occured. There are plenty of such cases:
- cancellation of non-head requests
- fail grabbing files in __io_queue_sqe()
- set REQ_F_NOWAIT and returning in __io_queue_sqe()

Add REQ_F_NEED_CLEANUP, which will force such requests with custom
allocated resourses go through cleanup handlers on put.

Cc: stable@vger.kernel.org # 5.5
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-08 13:06:58 -07:00
..
2019-09-27 15:10:34 -07:00
2020-02-03 17:03:42 +00:00
2020-02-06 12:21:01 +00:00
2019-09-19 09:42:37 -07:00
2019-11-11 09:21:59 -05:00
2019-09-19 09:42:37 -07:00
2020-02-05 05:28:20 +00:00
2020-02-06 07:12:11 +00:00
\n
2020-01-30 15:37:41 -08:00
2019-09-19 09:42:37 -07:00
2020-01-14 13:28:28 -08:00
2020-02-06 07:58:38 +00:00
2019-11-30 10:44:49 -08:00
2019-08-07 21:51:47 -04:00
2020-01-29 19:38:34 -08:00
2020-01-29 18:53:37 -08:00
2020-02-08 13:06:58 -07:00
2020-02-01 10:36:49 -08:00
2020-02-04 11:45:21 +00:00
2019-12-08 14:37:36 +01:00