torture: Don't try to offline the last CPU
authorPaul E. McKenney <paulmck@linux.ibm.com>
Wed, 23 Jan 2019 03:23:00 +0000 (19:23 -0800)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 26 Mar 2019 21:42:53 +0000 (14:42 -0700)
commit24aca4aea4f0179e0e56cf9ec610c27d07702945
tree72f765ac677410cbe5cf9fd69a156efb10b34df9
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
torture: Don't try to offline the last CPU

If there is only one online CPU, it doesn't make sense to try to offline
it, as any such attempt is guaranteed to fail.  This commit therefore
check for this condition and refuses to attempt the nonsensical.

Reported-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Tested-By: Su Yue <suy.fnst@cn.fujitsu.com>
kernel/torture.c