From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbcIOPlL (ORCPT ); Thu, 15 Sep 2016 11:41:11 -0400 Received: from imap.thunk.org ([74.207.234.97]:55732 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753719AbcIOPkx (ORCPT ); Thu, 15 Sep 2016 11:40:53 -0400 Date: Thu, 15 Sep 2016 11:40:29 -0400 From: "Theodore Ts'o" To: Fabian Frederick Cc: Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6 linux-next] ext4: fix memory leak in ext4_insert_range() Message-ID: <20160915154029.z3qtbfjjocu37paa@thunk.org> Mail-Followup-To: Theodore Ts'o , Fabian Frederick , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <1472069000-18897-1-git-send-email-fabf@skynet.be> <1472069000-18897-7-git-send-email-fabf@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1472069000-18897-7-git-send-email-fabf@skynet.be> User-Agent: NeoMutt/ (1.7.0) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 10:03:20PM +0200, Fabian Frederick wrote: > Running xfstests generic/013 with kmemleak gives the following: > > unreferenced object 0xffff8801d3d27de0 (size 96): > comm "fsstress", pid 4941, jiffies 4294860168 (age 53.485s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] kmemleak_alloc+0x23/0x40 > [] __kmalloc+0xf5/0x1d0 > [] ext4_find_extent+0x1ec/0x2f0 > [] ext4_insert_range+0x34c/0x4a0 > [] ext4_fallocate+0x4e2/0x8b0 > [] vfs_fallocate+0x134/0x210 > [] SyS_fallocate+0x3f/0x60 > [] entry_SYSCALL_64_fastpath+0x13/0x8f > [] 0xffffffffffffffff > > Problem seems mitigated by dropping refs and freeing path > when there's no path[depth].p_ext > > Signed-off-by: Fabian Frederick Applied, thanks. - Ted