• A
    cpu hotplug: mce: fix cpu hotplug error handling · d435d862
    Akinobu Mita 提交于
    - Clear kobject in percpu device_mce before calling sysdev_register() with
    
      Because mce_create_device() may fail and it leaves kobject filled with
      junk. It will be the problem when mce_create_device() will be called
      next time.
    
    - Fix error handling in mce_create_device()
    
      Error handling should not do sysdev_remove_file() with not yet added
      attributes.
    
    - Don't register hotcpu notifier when mce_create_device() returns error
    
    - Do mce_create_device() in CPU_UP_PREPARE instead of CPU_ONLINE
    
    Cc: Andi Kleen <andi@firstfloor.org>
    Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
    Cc: Gautham R Shenoy <ego@in.ibm.com>
    Cc: Oleg Nesterov <oleg@tv-sign.ru>
    Cc: Andi Kleen <ak@suse.de>
    Cc: Jan Beulich <jbeulich@novell.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    d435d862
mce_64.c 21.0 KB