diff --git a/kernel/cpu.c b/kernel/cpu.c index 88e81b8b1700445c70c8dd7fcf053e1518af8590..e5ebc498e3281a3178ede7ec55c5cb532231f63e 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2934,6 +2934,9 @@ __store_smt_control(struct device *dev, struct device_attribute *attr, else if (num_threads < orig_threads || force_off) ret = cpuhp_smt_disable(ctrlval); + if (ret) + cpu_smt_num_threads = orig_threads; + unlock_device_hotplug(); return ret ? ret : count; }