Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932603AbVIMLU5 (ORCPT ); Tue, 13 Sep 2005 07:20:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932604AbVIMLU5 (ORCPT ); Tue, 13 Sep 2005 07:20:57 -0400 Received: from gold.veritas.com ([143.127.12.110]:15472 "EHLO gold.veritas.com") by vger.kernel.org with ESMTP id S932603AbVIMLU4 (ORCPT ); Tue, 13 Sep 2005 07:20:56 -0400 Date: Tue, 13 Sep 2005 12:20:42 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@goblin.wat.veritas.com To: Andrew Morton cc: Kirill Korotaev , torvalds@osdl.org, linux-kernel@vger.kernel.org, xemul@sw.ru Subject: Re: [PATCH] error path in setup_arg_pages() misses vm_unacct_memory() In-Reply-To: <20050912132352.6d3a0e3a.akpm@osdl.org> Message-ID: References: <4325B188.10404@sw.ru> <20050912132352.6d3a0e3a.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 13 Sep 2005 11:20:56.0266 (UTC) FILETIME=[35B432A0:01C5B855] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 27 On Mon, 12 Sep 2005, Andrew Morton wrote: > Kirill Korotaev wrote: > > > > This patch fixes error path in setup_arg_pages() functions, since it > > misses vm_unacct_memory() after successful call of > > security_vm_enough_memory(). Also it cleans up error path. > > Ugh. The identifier `security_vm_enough_memory()' sounds like some > predicate which has no side-effects. Except it performs accounting. Hence > bugs like this. > > It's a shame that you mixed a largeish cleanup along with a bugfix - please > don't do that in future. > > Patch looks OK to me. Hugh, could you please double-check sometime? It's a good find, and the patch looks correct to me, so far as it goes. But I think it's the wrong patch, and incomplete: it can be done more appropriately, more simply and more completely in insert_vm_struct itself. I'll post a replacement patch (or admit I'm wrong) in a little while. Hugh - 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/