projects/linux·commit 45b44f0f

Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

45b44f0f · Linus Torvalds <[email protected]> · 2017-06-10 10:49:42 -07:00

Pull CPU hotplug fix from Ingo Molnar:
 "An error handling corner case fix"

* 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  cpu/hotplug: Drop the device lock on error
Commit
45b44f0f287d6d396b78466e13be1d1ea3d3097b
Parents
6b7ed458 · 40da1b11

Merge commit. Changes below are compared with the first parent: 6b7ed458.

Changes

1 files changed · +2 −2

FileStatusAddDelContent
kernel/cpu.cmodified+2−2View file

kernel/cpu.c

View file
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9ae6fbe..cb51034 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;
}