From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752477AbcFFRgD (ORCPT ); Mon, 6 Jun 2016 13:36:03 -0400 Received: from foss.arm.com ([217.140.101.70]:38432 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751802AbcFFRgB (ORCPT ); Mon, 6 Jun 2016 13:36:01 -0400 Date: Mon, 6 Jun 2016 18:35:56 +0100 From: Catalin Marinas To: Christoph Hellwig Cc: Shaun Tancheff , linux-block@vger.kernel.org, LKML , Jens Axboe , Larry.Finger@lwfinger.net, bart.vanassche@sandisk.com, drysdale@google.com Subject: Re: kmemleak report after 9082e87bfbf8 ("block: remove struct bio_batch") Message-ID: <20160606173556.GG29910@e104818-lin.cambridge.arm.com> References: <20160606112620.GA29910@e104818-lin.cambridge.arm.com> <20160606141334.GA6579@lst.de> <20160606161245.GC29910@e104818-lin.cambridge.arm.com> <20160606172718.GA30574@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160606172718.GA30574@lst.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 06, 2016 at 07:27:18PM +0200, 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. You can force more kmemleak scans via: echo scan > /sys/kernel/debug/kmemleak In my case, the leaks were reported for ext4 and appeared during boot, no need for mkfs. But kmemleak favours false negatives more than positives (otherwise it would be pretty unusable), so you don't always hit them. -- Catalin