Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753695Ab2FLQbw (ORCPT ); Tue, 12 Jun 2012 12:31:52 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:62802 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752104Ab2FLQbv (ORCPT ); Tue, 12 Jun 2012 12:31:51 -0400 MIME-Version: 1.0 In-Reply-To: <20120612142012.GB20467@suse.de> References: <1339406250-10169-1-git-send-email-kosaki.motohiro@gmail.com> <1339406250-10169-6-git-send-email-kosaki.motohiro@gmail.com> <20120612142012.GB20467@suse.de> From: KOSAKI Motohiro Date: Tue, 12 Jun 2012 12:31:29 -0400 Message-ID: Subject: Re: [PATCH 5/6] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() To: Mel Gorman Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Dave Jones , Christoph Lameter , stable@vger.kernel.org, Andrew Morton , Miao Xie , Peter Zijlstra Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 851 Lines: 18 > Why does dequeue_huge_page_vma() not need to be changed as well? It's > currently using mpol_cond_put() but if there is a goto retry_cpuset then > will it have not take an additional reference count and leak? dequeue_huge_page_vma() also uses get_vma_policy() and mpol_cond_put() pair. thus we don't need special concern. > Would it be more straight forward to put the mpol_cond_put() and __mpol_put() > calls after the "goto retry_cpuset" checks instead? I hope to keep symmetric. Sane design prevent a lot of unintentional breakage. Frankly says, now all caller assume the symmetric. It's natural. -- 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/