From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "*.citrix.com", Issuer "VeriSign Class 3 Secure Server CA - G2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D13F9B6FAC for ; Tue, 15 May 2012 20:36:00 +1000 (EST) Date: Tue, 15 May 2012 11:20:23 +0100 From: Stefano Stabellini To: Dan Carpenter Subject: Re: [patch] hvc_xen: NULL dereference on allocation failure In-Reply-To: <20120515084746.GC30265@elgon.mountain> Message-ID: References: <20120515084746.GC30265@elgon.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Cc: Konrad Rzeszutek Wilk , Greg Kroah-Hartman , Stefano Stabellini , "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , Alan Cox List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 15 May 2012, Dan Carpenter wrote: > If kzalloc() returns a NULL here, we pass a NULL to > xencons_disconnect_backend() which will cause an Oops. > > Also I removed the __GFP_ZERO while I was at it since kzalloc() implies > __GFP_ZERO. > > Signed-off-by: Dan Carpenter Acked-by: Stefano Stabellini