Skip to content
  • Akinobu Mita's avatar
    cpu hotplug: mce: fix cpu hotplug error handling · d435d862
    Akinobu Mita authored
    - 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
    - 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 <>
    Signed-off-by: default avatarAkinobu Mita <>
    Cc: Gautham R Shenoy <>
    Cc: Oleg Nesterov <>
    Cc: Andi Kleen <>
    Cc: Jan Beulich <>
    Signed-off-by: default avatarAndrew Morton <>
    Signed-off-by: default avatarLinus Torvalds <>