]> git.baikalelectronics.ru Git - kernel.git/commit
smp/hotplug: Replace BUG_ON and react useful
authorThomas Gleixner <tglx@linutronix.de>
Tue, 11 Jul 2017 20:06:24 +0000 (22:06 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 11 Jul 2017 20:25:44 +0000 (22:25 +0200)
commit620b9a15fb75295df7f9b705f0df7b3335f579fd
tree35fa8581121edb2a15846279b8d703f8b698afb0
parent8ea99fc3da409698b6900fceda6345003c486969
smp/hotplug: Replace BUG_ON and react useful

The move of the unpark functions to the control thread moved the BUG_ON()
there as well. While it made some sense in the idle thread of the upcoming
CPU, it's bogus to crash the control thread on the already online CPU,
especially as the function has a return value and the callsite is prepared
to handle an error return.

Replace it with a WARN_ON_ONCE() and return a proper error code.

Fixes: 8ea99fc3da40 ("smp/hotplug: Move unparking of percpu threads to the control CPU")
Rightfully-ranted-at-by: Linux Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/cpu.c