Pavel Begunkov c378c479c5 io_uring/af_unix: defer registered files gc to io_uring release
[ upstream commit 0091bfc81741b8d3aeb3b7ab8636f911b2de6e80 ]

Instead of putting io_uring's registered files in unix_gc() we want it
to be done by io_uring itself. The trick here is to consider io_uring
registered files for cycle detection but not actually putting them down.
Because io_uring can't register other ring instances, this will remove
all refs to the ring file triggering the ->release path and clean up
with io_ring_ctx_free().

Cc: stable@vger.kernel.org
Fixes: 6b06314c47e1 ("io_uring: add file set registration")
Reported-and-tested-by: David Bouman <dbouman03@gmail.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
[axboe: add kerneldoc comment to skb, fold in skb leak fix]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:25:55 +02:00
..
2022-08-21 15:16:16 +02:00
2020-10-17 11:18:18 -07:00
2022-10-26 13:25:35 +02:00
2020-09-21 15:00:40 -07:00
2020-10-02 15:00:49 -07:00
2020-10-16 17:21:51 +02:00
2020-10-13 15:58:10 -07:00
2020-10-19 14:28:30 -07:00
2022-07-07 17:52:17 +02:00
2022-09-05 10:28:58 +02:00
2020-10-15 14:43:29 -07:00
2022-10-26 13:25:42 +02:00
2020-09-16 08:54:53 -05:00
2022-04-13 21:00:56 +02:00
2020-11-19 22:38:29 -05:00
2020-10-13 18:38:32 -07:00
2021-03-04 11:37:59 +01:00
2022-08-21 15:16:08 +02:00
2020-09-04 09:25:20 -07:00
2021-02-07 15:37:17 +01:00
2021-11-18 14:03:37 +01:00
2022-08-21 15:15:21 +02:00
2020-09-04 12:46:07 +01:00
2021-06-30 08:47:26 -04:00
2020-10-07 14:28:39 -04:00
2020-10-17 11:18:18 -07:00
2020-08-31 12:52:33 -07:00
2021-03-30 14:32:05 +02:00
2020-10-18 09:27:10 -07:00
2020-10-14 16:09:32 -07:00
2020-09-26 22:55:05 -04:00
2021-05-07 11:04:32 +02:00
2021-05-14 09:50:18 +02:00
2021-05-14 09:50:18 +02:00
2021-05-14 09:50:31 +02:00
2020-09-10 14:03:31 -07:00
2020-10-05 13:21:49 +02:00
2020-10-20 14:39:37 -07:00