lkml.org 
[lkml]   [2014]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/mce: Don't unregister CPU hotplug notifier in error path
On Fri, Jun 20, 2014 at 04:16:50PM -0400, Boris Ostrovsky wrote:
> Sorry, mce_device_create().
>
> We can't call it in the notifier until mcheck_init_device() has been
> successfully executed (we need subsys_system_register(&mce_subsys)). I don't
> know whether we can call subsys_system_register() in mcheck_init() -- it is
> quite early in the boot.

I don't think it matters: we want to add only this oneliner to
mcheck_init():

__register_hotcpu_notifier(&mce_cpu_notifier);

and remove it from mcheck_init_device(), nothing else. And we don't need
the synchronization even because we're BSP only then.

I mean, we won't be able to offline CPUs that early anyway - thus
call mce_device_create() in the notifier callback - as we don't have
userspace to do "echo 0 > ..."

The rest of the code remains and mcheck_init_device() executes when it
does. Unless I'm missing something, of course...

Oh, not quite. We probably should remove the

__unregister_hotcpu_notifier(&mce_cpu_notifier);

from the error path too, as you suggest.

When you do, please hold that down in the commit message so that it is
clear what we're doing.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2014-06-20 23:01    [W:0.105 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site