From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244AbcFFSPY (ORCPT ); Mon, 6 Jun 2016 14:15:24 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36743 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbcFFSPW (ORCPT ); Mon, 6 Jun 2016 14:15:22 -0400 Subject: Re: kmemleak report after 9082e87bfbf8 ("block: remove struct bio_batch") To: Christoph Hellwig , Shaun Tancheff References: <20160606112620.GA29910@e104818-lin.cambridge.arm.com> <20160606141334.GA6579@lst.de> <20160606161245.GC29910@e104818-lin.cambridge.arm.com> <20160606172718.GA30574@lst.de> Cc: Catalin Marinas , linux-block@vger.kernel.org, LKML , Jens Axboe , Larry.Finger@lwfinger.net, bart.vanassche@sandisk.com, drysdale@google.com From: Jens Axboe Message-ID: <5755BDB6.1030907@kernel.dk> Date: Mon, 6 Jun 2016 12:15:18 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160606172718.GA30574@lst.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/06/2016 11:27 AM, Christoph Hellwig wrote: > On Mon, Jun 06, 2016 at 12:09:49PM -0500, Shaun Tancheff wrote: >> I'm pretty sure it is missing a bio_put() after submit_bio_wait(). >> >> Please excuse the hack-y patch but I think you need to do something >> like this ... >> (Note tabs eaten by gmail). > > Yeah, that makes sense - oddly enough submit_bio_wait doesn't do a > bio_put. Still not sure why I don't see the leaks after repeated > mkfs.xfs runs, though. Because some of the users (blkdev_issue_flush()) need to inspect the bio after completion. -- Jens Axboe