All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Keith Busch <keith.busch@intel.com>,
	wenxiong@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
	bjking@linux.vnet.ibm.com
Subject: Re: [PATCH] fs: System memory leak when running HTX with T10 DIF enabled
Date: Wed, 28 Jun 2017 20:52:35 +0200	[thread overview]
Message-ID: <20170628185235.GA13126@lst.de> (raw)
In-Reply-To: <c83d8e15-1f40-a99a-ed9b-337d146842bf@fb.com>

On Wed, Jun 28, 2017 at 12:44:00PM -0600, Jens Axboe wrote:
> On 06/28/2017 12:38 PM, Christoph Hellwig wrote:
> > On Wed, Jun 28, 2017 at 12:34:15PM -0600, Jens Axboe wrote:
> >> That's what I sent out.
> > 
> > Where?  Didn't see that anywhere..
> 
> Looks like you weren't CC'ed on the original thread. About an hour ago.
> 
> >> Here it is again. We should get this into 4.12,
> >> so would be great with a review or two.
> > 
> > Can we rename __bio_free to bio_uninit and add a comment to bio_init
> > that it must be paried with bio_uninit?
> 
> Let's keep it small for 4.12. We can do a cleanup on top of this for
> 4.13.

The rename is two additional lines for the patch, it's not going to
make a difference..

> > Except for that this looks fine, although there are a lot more callers
> > that should get this treatment..
> 
> Should only be an issue for on-stack bio's, since we don't go through
> the put/free path. Did a quick grep, looks like this is one of 3. One
> is floppy, which probably neither has DIF or uses blk-throttle. Then
> there's one in dm-bufio, didn't look too closely at that. Last one is
> this one.

Well, it's really all callers but bio_alloc_bioset itself that
will need this handling, as only bios that come from bio_alloc_bioset
will be freed through bio_free.  Most of them probably don't
support DIF, but they'll also miss the bio_disassociate_task call
this way, and will leak I/O context and css references if block
cgroup support is enabled.

  reply	other threads:[~2017-06-28 18:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 16:32 [PATCH] fs: System memory leak when running HTX with T10 DIF enabled wenxiong
2017-06-28 17:10 ` Keith Busch
2017-06-28 17:51   ` Jens Axboe
2017-06-28 18:31   ` Christoph Hellwig
2017-06-28 18:34     ` Jens Axboe
2017-06-28 18:38       ` Christoph Hellwig
2017-06-28 18:44         ` Jens Axboe
2017-06-28 18:52           ` Christoph Hellwig [this message]
2017-06-28 18:57             ` Jens Axboe
2017-06-28 21:10               ` Christoph Hellwig
2017-06-28 21:11               ` Shaohua Li
2017-06-28 21:25                 ` Christoph Hellwig
2017-06-28 17:42 ` Jens Axboe
2017-06-28 17:45   ` Jens Axboe

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=20170628185235.GA13126@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=bjking@linux.vnet.ibm.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wenxiong@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.