diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-04-03 01:16:03 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-04-03 04:03:27 +0300 |
commit | 561e4f9451d65fc2f7eef564e0064373e3019793 (patch) | |
tree | 2e64d28297c67422596b02f7504fe734a554676a /fs/bcachefs/error.c | |
parent | 6b69c4ab4f685327d9e10caf0d84217ba23a8c4b (diff) | |
download | linux-561e4f9451d65fc2f7eef564e0064373e3019793.tar.xz |
io_uring/kbuf: hold io_buffer_list reference over mmap
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>
Diffstat (limited to 'fs/bcachefs/error.c')
0 files changed, 0 insertions, 0 deletions