lkml.org 
[lkml]   [2017]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectBUG() 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

\
 
 \ /
  Last update: 2017-06-05 00:14    [W:0.064 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site