From: Christoph Hellwig <hch@infradead.org>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@infradead.org>,
David Milburn <dmilburn@redhat.com>,
chaitanya.kulkarni@wdc.com, dwagner@suse.de,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2 2/2] nvmet: avoid memleak by freeing any remaining aens in nvmet_async_events_free
Date: Wed, 20 May 2020 10:46:32 -0700 [thread overview]
Message-ID: <20200520174632.GA11265@infradead.org> (raw)
In-Reply-To: <df8d9a64-d7ff-b249-e5f9-c3b0cf092c4c@grimberg.me>
On Wed, May 20, 2020 at 10:41:56AM -0700, Sagi Grimberg wrote:
>
>
> On 5/20/20 10:27 AM, Christoph Hellwig wrote:
> > On Wed, May 20, 2020 at 05:39:18AM -0500, David Milburn wrote:
> > > Yi was able to reproduce the memleak using the v2 of the patch series
> > > since nvmet_async_events_free() ran before nvmet_add_async_event().
> > >
> > > http://lists.infradead.org/pipermail/linux-nvme/2020-May/030512.html
> > >
> > > With Sagi's patch below, I do see after nvmet_add_async_event(),
> > > nvmet_async_events_process pulls the request, decrements
> > > ctrl->nr_async_event_cmds to 0, and frees the aen,
> > > and no memory leak.
> > >
> > > http://lists.infradead.org/pipermail/linux-nvme/2020-May/030548.html
> >
> > Ok, let's try a version of Sagis latest suggestion then. What about
> > this (replacement for this patch only, I applied the first one already):
>
> Patch #1 is not needed, but where did you apply it?
nvme-5.8.
> Do you think the fix is 5.7-rc material?
At this point І don't think a memleak that has been there since day 1
is 5.7 material. І'd rather wait for 5.8 an get a stable backport
with the proper Fixes tag.
> The below looks fine, but maybe it would be good to split for small
> and easy fix that can go to stable, and then a bit more cleanup?
What would the small and simple fix be?
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-05-20 17:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 18:59 [PATCH v2 0/2] nvmet: fixup processing async events David Milburn
2020-05-18 18:59 ` [PATCH v2 1/2] nvmet: check command slot before pulling and freeing aen David Milburn
2020-05-20 17:18 ` Christoph Hellwig
2020-05-18 18:59 ` [PATCH v2 2/2] nvmet: avoid memleak by freeing any remaining aens in nvmet_async_events_free David Milburn
2020-05-19 8:33 ` Sagi Grimberg
2020-05-19 19:14 ` David Milburn
2020-05-19 20:42 ` Sagi Grimberg
2020-05-19 20:51 ` Sagi Grimberg
2020-05-20 6:18 ` Christoph Hellwig
2020-05-20 7:01 ` Sagi Grimberg
2020-05-20 6:16 ` Christoph Hellwig
2020-05-20 6:59 ` Sagi Grimberg
2020-05-20 7:03 ` Christoph Hellwig
2020-05-20 7:08 ` Sagi Grimberg
2020-05-20 7:15 ` Christoph Hellwig
2020-05-20 8:06 ` Sagi Grimberg
2020-05-20 10:39 ` David Milburn
2020-05-20 17:19 ` Sagi Grimberg
2020-05-20 17:23 ` David Milburn
2020-05-20 17:30 ` Christoph Hellwig
2020-05-20 17:27 ` Christoph Hellwig
2020-05-20 17:41 ` Sagi Grimberg
2020-05-20 17:46 ` Christoph Hellwig [this message]
2020-05-20 18:04 ` Sagi Grimberg
2020-05-20 18:15 ` Christoph Hellwig
2020-05-20 19:40 ` Sagi Grimberg
2020-05-19 8:40 ` [PATCH v2 0/2] nvmet: fixup processing async events Chaitanya Kulkarni
2020-05-19 19:17 ` David Milburn
2020-05-20 6:20 ` hch
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=20200520174632.GA11265@infradead.org \
--to=hch@infradead.org \
--cc=chaitanya.kulkarni@wdc.com \
--cc=dmilburn@redhat.com \
--cc=dwagner@suse.de \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).