Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756757Ab1FIXAH (ORCPT ); Thu, 9 Jun 2011 19:00:07 -0400 Received: from merlin.infradead.org ([205.233.59.134]:35957 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932115Ab1FIW76 (ORCPT ); Thu, 9 Jun 2011 18:59:58 -0400 Subject: Re: [PATCH v4 3.0-rc2-tip 2/22] 2: uprobes: Breakground page replacement. From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Masami Hiramatsu , Hugh Dickins , Christoph Hellwig , Andi Kleen , Thomas Gleixner , Jonathan Corbet , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , Ananth N Mavinakayanahalli , LKML In-Reply-To: <20110607125835.28590.25476.sendpatchset@localhost6.localdomain6> References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607125835.28590.25476.sendpatchset@localhost6.localdomain6> Content-Type: text/plain; charset="UTF-8" Date: Fri, 10 Jun 2011 01:03:27 +0200 Message-ID: <1307660607.2497.1771.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 26 On Tue, 2011-06-07 at 18:28 +0530, Srikar Dronamraju wrote: > + ret = anon_vma_prepare(vma); > + if (ret) > + goto unlock_out; You just leaked new_page. > + > + lock_page(new_page); > + ret = __replace_page(vma, old_page, new_page); > + unlock_page(new_page); > + if (ret != 0) > + page_cache_release(new_page); > +unlock_out: > + unlock_page(old_page); > + > +put_out: > + put_page(old_page); /* we did a get_page in the beginning */ > + return ret; > +} -- 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/