Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677062

Re: [PATCH] fs: System memory leak when running HTX with T10 DIF enabled

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject Re: [PATCH] fs: System memory leak when running HTX with T10 DIF enabled
Date 2017-06-28 21:00 +0200
Message-ID <tXqlY-15I-23@gated-at.bofh.it> (permalink)
References (1 earlier) <tXppX-t5-69@gated-at.bofh.it> <tXq2C-Yu-19@gated-at.bofh.it> <tXq2D-Yu-45@gated-at.bofh.it> <tXq2D-Yu-43@gated-at.bofh.it> <tXqlY-15I-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] fs: System memory leak when running HTX with T10 DIF  enabled Keith Busch <keith.busch@intel.com> - 2017-06-28 20:00 +0200
  Re: [PATCH] fs: System memory leak when running HTX with T10 DIF  enabled Jens Axboe <axboe@kernel.dk> - 2017-06-28 20:00 +0200
  Re: [PATCH] fs: System memory leak when running HTX with T10 DIF         enabled Christoph Hellwig <hch@lst.de> - 2017-06-28 20:40 +0200
    Re: [PATCH] fs: System memory leak when running HTX with T10 DIF         enabled Christoph Hellwig <hch@lst.de> - 2017-06-28 20:40 +0200
      Re: [PATCH] fs: System memory leak when running HTX with T10 DIF         enabled Christoph Hellwig <hch@lst.de> - 2017-06-28 21:00 +0200
        Re: [PATCH] fs: System memory leak when running HTX with T10 DIF         enabled Christoph Hellwig <hch@lst.de> - 2017-06-28 23:20 +0200
        Re: [PATCH] fs: System memory leak when running HTX with T10 DIF  enabled Shaohua Li <shli@kernel.org> - 2017-06-28 23:20 +0200
          Re: [PATCH] fs: System memory leak when running HTX with T10 DIF         enabled Christoph Hellwig <hch@lst.de> - 2017-06-28 23:30 +0200

csiph-web