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 io_uring: split out fadvise/madvise operations 2022-07-24 18:39:11 -06:00
alloc_cache.h
cancel.c io_uring/cancel: re-grab ctx mutex after finishing wait 2023-01-12 12:02:38 +01:00
cancel.h io_uring: add sync cancelation API through io_uring_register() 2022-07-24 18:39:15 -06:00
epoll.c
epoll.h io_uring: move epoll handler to its own file 2022-07-24 18:39:11 -06:00
fdinfo.c
fdinfo.h
filetable.c io_uring: drop any code related to SCM_RIGHTS 2024-03-26 18:20:22 -04:00
filetable.h io_uring: kill hot path fixed file bitmap debug checks 2022-10-16 17:07:53 -06:00
fs.c
fs.h io_uring: split out filesystem related operations 2022-07-24 18:39:11 -06:00
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 io_uring/msg_ring: fix missing lock on overflow for IOPOLL 2023-08-30 16:11:05 +02:00
msg_ring.h io_uring: get rid of double locking 2023-08-30 16:11:04 +02:00
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 io_uring: dont remove file from msg_ring reqs 2022-12-31 13:33:12 +01:00
openclose.c
openclose.h io_uring: split out fixed file installation and removal 2022-07-24 18:39:16 -06:00
poll.c io_uring: fix multishots with selected buffers 2025-02-21 13:49:53 +01:00
poll.h
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 io_uring: make io_kiocb_to_cmd() typesafe 2022-08-12 17:01:00 -06:00
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 io_uring: move uring_cmd handling to its own file 2022-07-24 18:39:11 -06:00
xattr.c __io_setxattr(): constify path 2022-09-01 17:39:05 -04:00
xattr.h