linux/io_uring
Jens Axboe 65938e81df io_uring/kbuf: hold io_buffer_list reference over mmap
commit 561e4f9451d65fc2f7eef564e0064373e3019793 upstream.

If we look up the kbuf, ensure that it doesn't get unregistered until
after we're done with it. Since we're inside mmap, we cannot safely use
the io_uring lock. Rely on the fact that we can lookup the buffer list
under RCU now and grab a reference to it, preventing it from being
unregistered until we're done with it. The lookup returns the
io_buffer_list directly with it referenced.

Cc: stable@vger.kernel.org # v6.4+
Fixes: 5cf4f52e6d8a ("io_uring: free io_buffer_list entries via RCU")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:36:03 +02:00
..
2024-01-20 11:51:38 +01:00
2022-12-07 06:47:13 -07:00
2024-04-03 15:28:29 +02:00
2023-05-04 08:19:05 -06:00
2023-01-29 15:17:41 -07:00
2023-08-10 10:24:25 -06:00
2023-08-11 10:42:57 -06:00