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 io_uring: fix poll/netmsg alloc caches 2023-04-06 12:10:52 +02:00
cancel.c
cancel.h
epoll.c
epoll.h
fdinfo.c io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid 2023-11-02 09:35:29 +01:00
fdinfo.h io_uring: move fdinfo helpers to its own file 2022-07-24 18:39:12 -06:00
filetable.c io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:20:22 -04:00
filetable.h
fs.c io_uring/fs: consider link->flags when getting path for LINKAT 2023-12-03 07:32:11 +01:00
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 io_uring/sqpoll: fix io-wq affinity when IORING_SETUP_SQPOLL is used 2023-09-19 12:27:54 +02:00
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 io_uring/net: introduce IORING_SEND_ZC_REPORT_USAGE flag 2022-12-31 13:33:11 +01:00
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 io_uring/poll: allow some retries for poll triggering spuriously 2023-03-11 13:55:43 +01:00
refs.h
rsrc.c io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:20:22 -04:00
rsrc.h io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:20:22 -04:00
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 io_uring/sqpoll: fix io-wq affinity when IORING_SETUP_SQPOLL is used 2023-09-19 12:27:54 +02:00
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