From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: Re: [PATCH] Null pointer dereference at free_vm_area() Date: Tue, 27 Dec 2005 16:54:49 +0100 Message-ID: <20051227155449.GB4126@snarc.org> References: <20051226155857.GA14912@br.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20051226155857.GA14912@br.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Glauber de Oliveira Costa Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Dec 26, 2005 at 01:58:57PM -0200, Glauber de Oliveira Costa wrote: > The free_vm_area() function may crash if it gets a NULL pointer as a > parameter. I do think that the right behaviour should be returning in > this case. This is, for example, the same behaviour of kfree(), and as > alloc_vm_area() may also return NULL, it may lead to a more elegant > alloc/free sequence in case of a fail. > > In case you agree with that, a patch follows. Hi, I quickly look around where free_vm_area is called, and I cannot see any codepath that could benefit such a code cleanup nor find any that could lead to a NULL pointer pass to it. I think you should provide a use for this patch if you want it to be applied. Thanks, -- Vincent Hanquez