• Rusty Russell's avatar
    Hotplug CPU: don't check cpu_online after take_cpu_down · 04321587
    Rusty Russell authored
    Akinobu points out that if take_cpu_down() succeeds, the cpu must be offline.
    Remove the cpu_online() check, and put a BUG_ON().
    
    Quoting Akinobu Mita:
       Actually the cpu_online() check was necessary before appling this
       stop_machine: simplify patch.
    
       With old __stop_machine_run(), __stop_machine_run() could succeed
       (return !IS_ERR(p) value) even if take_cpu_down() returned non-zero value.
       The return value of take_cpu_down() was obtained through kthread_stop()..
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    Cc: "Akinobu Mita" <akinobu.mita@gmail.com>
    04321587
cpu.c 10.6 KB