]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
io_uring/zcrx: fix page array leak
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 1 Feb 2026 21:18:53 +0000 (21:18 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Feb 2026 15:19:35 +0000 (08:19 -0700)
d9f595b9a65e ("io_uring/zcrx: fix leaking pages on sg init fail") fixed
a page leakage but didn't free the page array, release it as well.

Fixes: b84621d96ee02 ("io_uring/zcrx: allocate sgtable for umem areas")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c

index b99cf2c6670aa884098f875f396cc2df6b63faf2..f18c173a7bcbaf572b6eda8b225878820fb6514b 100644 (file)
@@ -197,6 +197,7 @@ static int io_import_umem(struct io_zcrx_ifq *ifq,
                                        GFP_KERNEL_ACCOUNT);
        if (ret) {
                unpin_user_pages(pages, nr_pages);
+               kvfree(pages);
                return ret;
        }