From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser 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 10:07:54 +0000 Message-ID: References: <493F982A.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <493F982A.76E4.0078.0@novell.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: Jan Beulich , Isaku Yamahata Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 10/12/2008 09:21, "Jan Beulich" wrote: >>>> 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... Can you just fix up Isaku's patch and then we'll collect a fresh sign-off from him too? -- Keir