From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re:[PATCH 2/2] linux/x86: use shared page indicatingthe need for an EOI notification) Date: Wed, 10 Dec 2008 09:21:30 +0000 Message-ID: <493F982A.76E4.0078.0@novell.com> References: <493E5C91.76E4.0078.0@novell.com> <20081210040824.GD15447%yamahata@valinux.co.jp> <20081210041650.GF15447%yamahata@valinux.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20081210041650.GF15447%yamahata@valinux.co.jp> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Isaku Yamahata Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> Isaku Yamahata 10.12.08 05:16 >>> >Sorry I sent out the old one. Here is the corrected one. >NULL check must be before its use. Not really - alloc_bootmem() etc panic for themselves unless you use the _nopanic variants. Also, alloc_bootmem() etc zero the allocated memory, so no need for memset(), and the subsequent BUG_ON() can obviously go away. And finally, PAGE_SIZE isn't correct, you should use the size originally used, just slightly modified: BITS_TO_LONGS(ALIGN(NR_PIRQS, PAGE_SIZE * 8)) I was about to put together a patch for this myself... Jan