[GIT PULL] CPU hotplug fix

From: Ingo Molnar
Date: Sat Jun 10 2017 - 04:47:18 EST


Linus,

Please pull the latest smp-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp-urgent-for-linus

# HEAD: 40da1b11f01e43aad1aa6cea64681b6125e8a2a7 cpu/hotplug: Drop the device lock on error

An error handling corner case fix.

Thanks,

Ingo

------------------>
Sebastian Andrzej Siewior (1):
cpu/hotplug: Drop the device lock on error


kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9ae6fbe5b5cf..cb5103413bd8 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1658,13 +1658,13 @@ static ssize_t write_cpuhp_target(struct device *dev,
ret = !sp->name || sp->cant_stop ? -EINVAL : 0;
mutex_unlock(&cpuhp_state_mutex);
if (ret)
- return ret;
+ goto out;

if (st->state < target)
ret = do_cpu_up(dev->id, target);
else
ret = do_cpu_down(dev->id, target);
-
+out:
unlock_device_hotplug();
return ret ? ret : count;
}