Re: [PATCH 0/3] io_uring: fix resource leak issues

From: Jens Axboe

Date: Wed Apr 08 2026 - 08:51:57 EST


On 4/8/26 12:54 AM, KobaK wrote:
> From: Koba Ko <kobak@xxxxxxxxxx>
>
> Three resource leak fixes found by code audit:
>
> 1. memmap: pinned pages and pages array leak on WARN_ON path in
> io_region_pin_pages() ? mr->pages is never assigned so the caller's
> cleanup is a no-op.
>
> 2. rsrc: kfree() used instead of io_cache_free() in
> io_buffer_register_bvec() error path ? bypasses cache return.
>
> 3. zcrx: io_import_umem() leaves live pinned pages in a partially
> initialized struct on io_account_mem() failure, and
> io_release_area_mem() is not idempotent (missing pages = NULL),
> creating a double-free hazard.

General advice - anyone can point an LLM at a code base and get some
reports, but please apply some actual critical thinking to the "issues"
found before blindly sending them out.

--
Jens Axboe