>>> Isaku Yamahata <yamahata@xxxxxxxxxxxxx> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|