public inbox for [email protected]
 help / color / mirror / Atom feed
From: Lukas Bulwahn <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected], Pavel Begunkov <[email protected]>
Subject: Re: [PATCH for-next] io_uring: fix not released cached task refs
Date: Mon, 10 Jan 2022 14:20:43 +0100	[thread overview]
Message-ID: <CAKXUXMxnowRRZTLZAW_zF0Su8PYBKJc3x3j=m+-cyM6ox6E2LQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

On Sun, Jan 9, 2022 at 5:23 PM Jens Axboe <[email protected]> wrote:
>
> On Sun, 9 Jan 2022 00:53:22 +0000, Pavel Begunkov wrote:
> > tctx_task_work() may get run after io_uring cancellation and so there
> > will be no one to put cached in tctx task refs that may have been added
> > back by tw handlers using inline completion infra, Call
> > io_uring_drop_tctx_refs() at the end of the main tw handler to release
> > them.
> >
> >
> > [...]
>
> Applied, thanks!
>
> [1/1] io_uring: fix not released cached task refs
>       commit: 3cc7fdb9f90a25ae92250bf9e6cf3b9556b230e9
>

The memory leak, reported in
https://lore.kernel.org/all/CAKXUXMzHUi3q4K-OpiBKyMAsQ2K=FOsVzULC76v05nCUKNCA+Q@mail.gmail.com/:

    - does     trigger on next-20220107.

    - does NOT trigger on next-20220107 + cherry-pick
3cc7fdb9f90a25ae92250bf9e6cf3b9556b230e9.

    - does NOT trigger on next-20220110, which already includes commit
3cc7fdb9f90a25ae92250bf9e6cf3b9556b230e9.


So, with that I think this patch resolves the reported memory leak for good:

Tested-by: Lukas Bulwahn <[email protected]>

Pavel, thanks for the quick fix.

I guess that the patch has already landed in linux-next, so the tag
above will not be applied to the commit, but is only for our own
historic reference.

Lukas

      reply	other threads:[~2022-01-10 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-09  0:53 [PATCH for-next] io_uring: fix not released cached task refs Pavel Begunkov
2022-01-09 16:23 ` Jens Axboe
2022-01-10 13:20   ` Lukas Bulwahn [this message]

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 \
    --in-reply-to='CAKXUXMxnowRRZTLZAW_zF0Su8PYBKJc3x3j=m+-cyM6ox6E2LQ@mail.gmail.com' \
    [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