Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755960AbcLZVAZ (ORCPT ); Mon, 26 Dec 2016 16:00:25 -0500 Received: from mail.skyhub.de ([78.46.96.112]:59538 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755798AbcLZVAX (ORCPT ); Mon, 26 Dec 2016 16:00:23 -0500 Date: Mon, 26 Dec 2016 22:00:15 +0100 From: Borislav Petkov To: Thomas Gleixner Cc: Boris Ostrovsky , Markus Trippelsdorf , Linus Torvalds , LKML , Ingo Molnar , "H. Peter Anvin" , Sebastian Andrzej Siewior Subject: Re: [GIT pull] smp/hotplug: Removal of notifiers Message-ID: <20161226210015.GA2945@nazgul.tnic> References: <20161226074530.GA297@x4> <20161226110600.GB297@x4> <20161226154502.GA287@x4> <53e3b52b-f353-63c8-f96f-649d754596bc@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1083 Lines: 38 On Mon, Dec 26, 2016 at 07:21:44PM +0100, Thomas Gleixner wrote: > Is there anything interesting error message before the BUG hits? I'll try > to reproduce on a AMD box tomorrow. Hmm, so lemme see if I see it correctly: threshold_create_bank() does kobject_create_and_add(name, &dev->kobj); and that dev thing is struct device *dev = per_cpu(mce_device, cpu); BUT(!), those mce_device per-CPU things get initialized in mce_cpu_online() |-> mce_device_create(cpu); With a CONFIG_HOTPLUG_CPU=n .config that doesn't happen, right? Oh, and I see what could've changed that: 8c0eeac819c8 ("x86/mcheck: Move CPU_ONLINE and CPU_DOWN_PREPARE to hotplug state machine") And before that, we did call mce_device_create(cpu) in mcheck_init_device() which is a device initcall and not dependent on CPU hotplug. And frankly, flipping back to the for_each_online_cpu(i) is yucky as hell but I don't see any other/better solution besides pulling up mce_device_create() into mcheck_init_device()... Hmmm. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --