Re: [mainline][Memory off/on][83e3c48] kernel Oops with memory hot-unplug on ppc

From: Kirill A. Shutemov
Date: Mon Feb 19 2018 - 08:56:56 EST


On Mon, Feb 19, 2018 at 02:47:35PM +0100, Michal Hocko wrote:
> [CC Kirill - I have a vague recollection that there were some follow ups
> for 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for
> CONFIG_SPARSEMEM_EXTREME=y"). Does any of them apply to this issue?]

All fixups are in v4.15.

> On Mon 05-02-18 19:54:24, Abdul Haleem wrote:
> >
> > Greetings,
> >
> > Kernel Oops seen when memory hot-unplug on powerpc mainline kernel.
> >
> > Machine: Power6 PowerVM ppc64
> > Kernel: 4.15.0
> > Config: attached
> > gcc: 4.8.2
> > Test: Memory hot-unplug of a memory block
> > echo offline > /sys/devices/system/memory/memory<x>/state
> >
> > The faulty instruction address points to the code path:
> >
> > # gdb -batch vmlinux -ex 'list *(0xc000000000238330)'
> > 0xc000000000238330 is in get_pfnblock_flags_mask
> > (./include/linux/mmzone.h:1157).
> > 1152 #endif
> > 1153
> > 1154 static inline struct mem_section *__nr_to_section(unsigned long nr)
> > 1155 {
> > 1156 #ifdef CONFIG_SPARSEMEM_EXTREME
> > 1157 if (!mem_section)
> > 1158 return NULL;
> > 1159 #endif
> > 1160 if (!mem_section[SECTION_NR_TO_ROOT(nr)])
> > 1161 return NULL;
> >
> >
> > The code was first introduced with commit( 83e3c48: mm/sparsemem:
> > Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y)

Any chance to bisect it?

Could you check if the commit just before 83e3c48729d9 is fine?

--
Kirill A. Shutemov