public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Subject: Re: [PATCH 4/6] io_uring: introduce memory regions
Date: Fri, 15 Nov 2024 07:44:40 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <cd8e0927651ecdb99776503e50aa3554573b9a61.1731556844.git.asml.silence@gmail.com>

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

  reply	other threads:[~2024-11-15 14:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14  4:14 [PATCH 0/6] regions, param pre-mapping and reg waits extension Pavel Begunkov
2024-11-14  4:14 ` [PATCH 1/6] io_uring: fortify io_pin_pages with a warning Pavel Begunkov
2024-11-14  4:14 ` [PATCH 2/6] io_uring: disable ENTER_EXT_ARG_REG for IOPOLL Pavel Begunkov
2024-11-14  4:14 ` [PATCH 3/6] io_uring: temporarily disable registered waits Pavel Begunkov
2024-11-14  4:14 ` [PATCH 4/6] io_uring: introduce memory regions Pavel Begunkov
2024-11-15 14:44   ` Jens Axboe [this message]
2024-11-15 15:54     ` Pavel Begunkov
2024-11-14  4:14 ` [PATCH 5/6] io_uring: add parameter region registration Pavel Begunkov
2024-11-14  4:14 ` [PATCH 6/6] io_uring: enable IORING_ENTER_EXT_ARG_REG back Pavel Begunkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox