Re: [PATCH 1/8] x86: do not free zero sized per cpu areas

From: Joel Becker
Date: Thu Mar 25 2010 - 18:31:44 EST


On Wed, Mar 24, 2010 at 03:37:02AM -0700, Yinghai Lu wrote:
> From: Ian Campbell <ian.campbell@xxxxxxxxxx>
>
> This avoids an infinite loop in free_early_partial().
>
> Add a warning to free_early_partial to catch future problems.
>
> -v5: put back start > end back into WARN_ONCE()
> -v6: use one line for if according to linus
>
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>

Tested-by: Joel Becker <joel.becker@xxxxxxxxxx>

I ran into this when moving my paravirt_ops PVMs to 2.6.34-rc1.
I turned on CONFIG_NO_BOOTMEM to try it because it was the default. I
had to put earlyprintk=xen on the command line to debug the problem.
My boots hung after:

...
(early) Local APIC disabled by BIOS -- you can enable it with "lapic"
(early) APIC: disable apic facility
(early) APIC: switched to apic NOOP
(early) Allocating PCI resources starting at 78000000 (gap: 78000000:88000000)
(early) Booting paravirtualized kernel on Xen
(early) Xen version: 3.1.3-rc3
(early) setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1

Bisecting narrowed the problem to fb90ef [early_res: Add
free_early_partial()]. Turning off CONFIG_NO_BOOTMEM allowed me to
boot. I then hunted up references to this function, which found me this
patch.
This patch successfully resolved the problem.

Joel

--

"The nice thing about egotists is that they don't talk about other
people."
- Lucille S. Harper

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/