sst-linux/io_uring
Pavel Begunkov 9135df0218 io_uring: fix corner case forgetting to vunmap
Commit 43eef70e7e2ac74e7767731dd806720c7fb5e010 upstream.

io_pages_unmap() is a bit tricky in trying to figure whether the pages
were previously vmap'ed or not. In particular If there is juts one page
it belives there is no need to vunmap. Paired io_pages_map(), however,
could've failed io_mem_alloc_compound() and attempted to
io_mem_alloc_single(), which does vmap, and that leads to unpaired vmap.

The solution is to fail if io_mem_alloc_compound() can't allocate a
single page. That's the easiest way to deal with it, and those two
functions are getting removed soon, so no need to overcomplicate it.

Cc: stable@vger.kernel.org
Fixes: 3ab1db3c6039e ("io_uring: get rid of remap_pfn_range() for mapping rings/sqes")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/477e75a3907a2fe83249e49c0a92cd480b2c60e0.1732569842.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-03-28 21:58:53 +01: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_uring.c io_uring: fix corner case forgetting to vunmap 2025-03-28 21:58:53 +01:00
io_uring.h io_uring: get rid of remap_pfn_range() for mapping rings/sqes 2025-03-28 21:58:53 +01:00
io-wq.c io_uring/io-wq: inherit cpuset of cgroup in io worker 2024-10-17 15:21:14 +02:00
io-wq.h
kbuf.c io_uring: check for non-NULL file pointer in io_file_can_poll() 2024-06-21 14:35:42 +02:00
kbuf.h
Makefile
msg_ring.c
msg_ring.h
net.c io_uring/net: save msg_control for compat 2025-03-07 16:56:47 +01:00
net.h
nop.c io_uring: fail NOP if non-zero op flags is passed in 2024-06-12 11:02:55 +02:00
nop.h
notif.c
notif.h
opdef.c
opdef.h
openclose.c io_uring: correct check for O_TMPFILE 2023-08-16 18:27:24 +02:00
openclose.h
poll.c io_uring: fix multishots with selected buffers 2025-02-21 13:49:53 +01:00
poll.h
refs.h
rsrc.c
rsrc.h
rw.c io_uring/rw: commit provided buffer state on async 2025-02-21 13:49:53 +01:00
rw.h
slist.h
splice.c
splice.h
sqpoll.c io_uring/sqpoll: fix sqpoll error handling races 2025-01-02 10:30:54 +01:00
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c io_uring/tctx: work around xa_store() allocation error issue 2024-12-14 19:54:49 +01:00
tctx.h
timeout.c io_uring: fix io_match_task must_hold 2024-08-03 08:49:53 +02:00
timeout.h
uring_cmd.c
uring_cmd.h
xattr.c
xattr.h