On 11/13/24 9:14 PM, Pavel Begunkov wrote: > +void io_free_region(struct io_ring_ctx *ctx, struct io_mapped_region *mr) > +{ > + if (mr->pages) > + unpin_user_pages(mr->pages, mr->nr_pages); > + if (mr->vmap_ptr) > + vunmap(mr->vmap_ptr); > + if (mr->nr_pages && ctx->user) > + __io_unaccount_mem(ctx->user, mr->nr_pages); > + > + memset(mr, 0, sizeof(*mr)); > +} This is missing a kvfree(mr->pages); -- Jens Axboe