Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Null pointer dereference at free_vm_area()

To: Glauber de Oliveira Costa <glommer@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Null pointer dereference at free_vm_area()
From: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxx>
Date: Tue, 27 Dec 2005 16:54:49 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 27 Dec 2005 15:58:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051226155857.GA14912@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20051226155857.GA14912@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>