linux-stable/io_uring
Jens Axboe 65938e81df io_uring/kbuf: hold io_buffer_list reference over mmap
commit 561e4f9451 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: 5cf4f52e6d ("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
..
advise.c
advise.h
alloc_cache.h
cancel.c
cancel.h
epoll.c
epoll.h
fdinfo.c
fdinfo.h
filetable.c
filetable.h
fs.c
fs.h
io-wq.c
io-wq.h
io_uring.c io_uring/kbuf: hold io_buffer_list reference over mmap 2024-04-10 16:36:03 +02:00
io_uring.h
kbuf.c io_uring/kbuf: hold io_buffer_list reference over mmap 2024-04-10 16:36:03 +02:00
kbuf.h io_uring/kbuf: hold io_buffer_list reference over mmap 2024-04-10 16:36:03 +02:00
Makefile
msg_ring.c
msg_ring.h
net.c
net.h
nop.c
nop.h
notif.c
notif.h
opdef.c
opdef.h
openclose.c
openclose.h
poll.c
poll.h
refs.h
rsrc.c
rsrc.h
rw.c
rw.h
slist.h
splice.c
splice.h
sqpoll.c
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c
tctx.h
timeout.c
timeout.h
uring_cmd.c
uring_cmd.h
xattr.c
xattr.h