Re: [GIT pull] smp/hotplug: Removal of notifiers

From: Markus Trippelsdorf
Date: Mon Dec 26 2016 - 10:45:12 EST


On 2016.12.26 at 12:06 +0100, Markus Trippelsdorf wrote:
> On 2016.12.26 at 08:45 +0100, Markus Trippelsdorf wrote:
> > On 2016.12.25 at 14:39 +0100, Thomas Gleixner wrote:
> > > Linus,
> > >
> > > please pull the latest smp-urgent-for-linus git tree from:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp-urgent-for-linus
> > >
> > > Thomas Gleixner (11):
> > > cpu/hotplug: Prevent overwriting of callbacks
> >
> > The following commit:
> >
> > commit dc280d93623927570da279e99393879dbbab39e7
> > Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Date: Wed Dec 21 20:19:49 2016 +0100
> >
> > cpu/hotplug: Prevent overwriting of callbacks
> >
> > results in an early OOPs during boot on my AMD machine.
> > I haven't wrote down the entire backtrace, but basically things start to
> > go wrong in mce_threshold_create_device() from
> > arch/x86/kernel/cpu/mcheck/mce_amd.c.
> >
> > # CONFIG_HOTPLUG_CPU is not set
> >
> > Reverting the commit "fixes" the issue for me.
>
> CCing Sebastian and Borislav.

BUG: unable to handle kernel NULL pointer dereference at 000000000000004c

RIP: kobject_get at lib/kobject.c:594
(inlined by) kobject_add_internal at lib/kobject.c:214

? kobj_to_dev at include/linux/device.h:968 (discriminator 1)
(inlined by) get_device at drivers/base/core.c:1796 (discriminator 1)

? kobject_add at lib/kobject.c:415

? kobject_create_and_add at lib/kobject.c:753

? threshold_create_bank at arch/x86/kernel/cpu/mcheck/mce_amd.c:1212
(inlined by) mce_threshold_create_device at arch/x86/kernel/cpu/mcheck/mce_amd.c:1348

The comment in arch/x86/kernel/cpu/mcheck/mce_amd.c says:

1384 * mcheck_init_device should be inited before threshold_init_device to
1385 * initialize mce_device, otherwise a NULL ptr dereference will cause panic.

--
Markus