From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx107.postini.com [74.125.245.107]) by kanga.kvack.org (Postfix) with SMTP id 5F39E6B0062 for ; Wed, 5 Dec 2012 16:59:22 -0500 (EST) Received: by mail-pa0-f41.google.com with SMTP id bj3so4101082pad.14 for ; Wed, 05 Dec 2012 13:59:21 -0800 (PST) Date: Wed, 5 Dec 2012 13:59:20 -0800 (PST) From: Hugh Dickins Subject: Re: [PATCH] tmpfs: fix shared mempolicy leak In-Reply-To: Message-ID: References: <1349801921-16598-1-git-send-email-mgorman@suse.de> <1349801921-16598-6-git-send-email-mgorman@suse.de> <20121204141501.GA2797@suse.de> <20121205095221.GB2489@suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Tommi Rantala Cc: Mel Gorman , Andi Kleen , Andrew Morton , KOSAKI Motohiro , Dave Jones , Christoph Lameter , LKML , Linux-MM On Wed, 5 Dec 2012, Tommi Rantala wrote: > 2012/12/5 Mel Gorman : > > On Tue, Dec 04, 2012 at 11:24:30PM -0800, Hugh Dickins wrote: > >> From: Mel Gorman > >> > >> Commit 00442ad04a5e ("mempolicy: fix a memory corruption by refcount > >> imbalance in alloc_pages_vma()") changed get_vma_policy() to raise the > >> refcount on a shmem shared mempolicy; whereas shmem_alloc_page() went > >> on expecting alloc_page_vma() to drop the refcount it had acquired. > >> This deserves a rework: but for now fix the leak in shmem_alloc_page(). > > > > Thanks Hugh for turning gibber into a patch! > > > > Signed-off-by: Mel Gorman > > > > Tommi, just in case, can you confirm this fixes the problem for you please? > > Confirmed! No more complaints from kmemleak. Great, thanks. I'll update the tags and send straight to Linus now. Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org