Messages in this thread | | | Date | Fri, 2 Jun 2017 16:47:52 +0200 | From | Sebastian Andrzej Siewior <> | Subject | BUG() the kernel via the hotplug target sysfs file |
| |
It is possible to BUG() the kernel via the hotplug target interface via: |echo 91 > /sys/devices/system/cpu/cpu7/hotplug/target | Unregister pv shared memory for cpu 7 | ------------[ cut here ]------------ | kernel BUG at kernel/cpu.c:747!
which is:
| void cpuhp_report_idle_dead(void) | { | struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state); | => BUG_ON(st->state != CPUHP_AP_OFFLINE); | … | }
So the states are: 89: idle:dead 90: ap:offline 91: sched:starting 92: RCU/tree:dying 132: ap:online 133: cpu:teardown
and cpu:teardown (takedown_cpu()) invokes: cpu_stopper_thread() multi_cpu_stop() take_cpu_down() native_cpu_disable() cpu_disable_common()
which clears the CPU from cpu_online_mask. This means, as things are now, we can't stop at any state between cpu:teardown and idle:dead.
Sebastian
| |