Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756421Ab0KJUTl (ORCPT ); Wed, 10 Nov 2010 15:19:41 -0500 Received: from mx2.netapp.com ([216.240.18.37]:45160 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756161Ab0KJUTk (ORCPT ); Wed, 10 Nov 2010 15:19:40 -0500 X-IronPort-AV: E=Sophos;i="4.59,179,1288594800"; d="scan'208";a="480391884" Message-ID: <4CDAFE4B.1060408@netapp.com> Date: Wed, 10 Nov 2010 15:19:23 -0500 From: Bryan Schumaker User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Lightning/1.0b2 Lanikai/3.1.6 MIME-Version: 1.0 To: Catalin Marinas CC: Trond Myklebust , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Memory leak via nfs_readdir_make_qstr References: <1289412737.4513.80.camel@e102109-lin.cambridge.arm.com> In-Reply-To: <1289412737.4513.80.camel@e102109-lin.cambridge.arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 28 On 11/10/2010 01:12 PM, Catalin Marinas wrote: > Hi, > > I tested the 2.6.37-rc1 on an ARM platform with nfsroot filesystem. > Kmemleak reports quite a lot (> 150) of leaks like below. You seem to > have made changes recently to this area. > > > Any quick thoughts? I'll have a look tomorrow as well. Hi My first thought is that this is because of how we are caching the result of a readdir now. We are storing the name of each directory entry as part of the cache, and this requires allocating memory for each string. These are freed on unmount (see nfs_readdir_clear_array() in fs/nfs/dir.c), but you probably don't want to unmount your root filesytem... - Bryan > > Thanks, > > Catalin > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/