[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] page_alloc: clear nr_bootmem_regions in end_boot_allocator()

>>> On 02.02.17 at 16:41, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 02/02/17 15:25, Jan Beulich wrote:
>> --- a/xen/common/page_alloc.c
>> +++ b/xen/common/page_alloc.c
>> @@ -329,13 +329,16 @@ unsigned long __init alloc_boot_pages(
>>      unsigned long nr_pfns, unsigned long pfn_align)
>>  {
>>      unsigned long pg, _e;
>> -    int i;
>> +    unsigned int i = nr_bootmem_regions;
>> -    for ( i = nr_bootmem_regions - 1; i >= 0; i-- )
>> +    BOOT_BUG_ON(!nr_bootmem_regions);
> Can this just be a plain BUG_ON() to avoid adding further work which
> needs to undone for livepatching purposes?

Well, for one I don't like adding inconsistency here. And then I'm
not convinced switching over to BUG_ON() is a good idea, so I'd
rather leave that discussion for when someone indeed wants to
make that change. In particular I'm not convinced that during
very early boot all the register and stack dumping functions
reliably, in which case a simple panic() is more likely to produce
at least no confusing output.

> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Let me know whether this stands even without making the
requested change.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.