[tip:smp/hotplug] padata: Fix fallout from get_online_cpus() rework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  b6a82f2d736a19456b4eff64d9b7c165f15e5698
Gitweb:     http://git.kernel.org/tip/b6a82f2d736a19456b4eff64d9b7c165f15e5698
Author:     Thomas Gleixner <tglx@xxxxxxxxxxxxx>
AuthorDate: Sat, 22 Apr 2017 08:52:39 +0200
Committer:  Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Sat, 22 Apr 2017 10:32:17 +0200

padata: Fix fallout from get_online_cpus() rework

The rework of the cpu hotplug locking missed to remove a put_online_cpus()
call and to convert the hotplug state registration to the cpuslocked()
version. Fix it up.

Fixes: bbd8797975ce ("padata: Avoid nested calls to get_online_cpus() in pcrypt_init_padata()")
Reported-by: Fenguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 kernel/padata.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/padata.c b/kernel/padata.c
index dc74ddba..2d5a70f 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -982,14 +982,12 @@ static struct padata_instance *padata_alloc(struct workqueue_struct *wq,
 
 	pinst->flags = 0;
 
-	put_online_cpus();
-
 	BLOCKING_INIT_NOTIFIER_HEAD(&pinst->cpumask_change_notifier);
 	kobject_init(&pinst->kobj, &padata_attr_type);
 	mutex_init(&pinst->lock);
 
 #ifdef CONFIG_HOTPLUG_CPU
-	cpuhp_state_add_instance_nocalls(hp_online, &pinst->node);
+	cpuhp_state_add_instance_nocalls_cpuslocked(hp_online, &pinst->node);
 #endif
 	return pinst;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux