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
Unified · Split
| @@ -1658,13 +1658,13 @@ static ssize_t write_cpuhp_target(struct device *dev, · 1657 unmodified lines | |||
| 1658 | ret = !sp->name || sp->cant_stop ? -EINVAL : 0; | 1658 | ret = !sp->name || sp->cant_stop ? -EINVAL : 0; |
| 1659 | mutex_unlock(&cpuhp_state_mutex); | 1659 | mutex_unlock(&cpuhp_state_mutex); |
| 1660 | if (ret) | 1660 | if (ret) |
| 1661 | return ret; | 1661 | goto out; |
| 1662 | 1662 | ||
| 1663 | if (st->state < target) | 1663 | if (st->state < target) |
| 1664 | ret = do_cpu_up(dev->id, target); | 1664 | ret = do_cpu_up(dev->id, target); |
| 1665 | else | 1665 | else |
| 1666 | ret = do_cpu_down(dev->id, target); | 1666 | ret = do_cpu_down(dev->id, target); |
| 1667 | 1667 | out: | |
| 1668 | unlock_device_hotplug(); | 1668 | unlock_device_hotplug(); |
| 1669 | return ret ? ret : count; | 1669 | return ret ? ret : count; |
| 1670 | } | 1670 | } |