lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Jul 2016 12:59:17 -0700
From:	tip-bot for Boris Ostrovsky <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	boris.ostrovsky@...cle.com, linux-kernel@...r.kernel.org,
	mingo@...nel.org, tglx@...utronix.de, hpa@...or.com
Subject: [tip:smp/hotplug] hotplug: Prevent alloc/free of irq descriptors
 during cpu up/down (again)

Commit-ID:  484afa6961eb9409ea120b38397e6883696d8aa6
Gitweb:     http://git.kernel.org/tip/484afa6961eb9409ea120b38397e6883696d8aa6
Author:     Boris Ostrovsky <boris.ostrovsky@...cle.com>
AuthorDate: Thu, 17 Mar 2016 09:33:33 -0400
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 22 Jul 2016 21:53:18 +0200

hotplug: Prevent alloc/free of irq descriptors during cpu up/down (again)

Now that Xen no longer allocates irqs in _cpu_up() we can restore
commit a89941816726 ("hotplug: Prevent alloc/free of irq descriptors
during cpu up/down")

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: xen-devel@...ts.xenproject.org
Cc: david.vrabel@...rix.com
Cc: konrad.wilk@...cle.com
Link: http://lkml.kernel.org/r/1458221613-21563-3-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 arch/x86/kernel/smpboot.c | 11 -----------
 kernel/cpu.c              |  8 ++++++++
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index fafe8b9..d5b36ba 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1101,17 +1101,8 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
 
 	common_cpu_up(cpu, tidle);
 
-	/*
-	 * We have to walk the irq descriptors to setup the vector
-	 * space for the cpu which comes online.  Prevent irq
-	 * alloc/free across the bringup.
-	 */
-	irq_lock_sparse();
-
 	err = do_boot_cpu(apicid, cpu, tidle);
-
 	if (err) {
-		irq_unlock_sparse();
 		pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu);
 		return -EIO;
 	}
@@ -1129,8 +1120,6 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
 		touch_nmi_watchdog();
 	}
 
-	irq_unlock_sparse();
-
 	return 0;
 }
 
diff --git a/kernel/cpu.c b/kernel/cpu.c
index f24f459..67f4943 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -349,8 +349,16 @@ static int bringup_cpu(unsigned int cpu)
 	struct task_struct *idle = idle_thread_get(cpu);
 	int ret;
 
+	/*
+	 * Some architectures have to walk the irq descriptors to
+	 * setup the vector space for the cpu which comes online.
+	 * Prevent irq alloc/free across the bringup.
+	 */
+	irq_lock_sparse();
+
 	/* Arch-specific enabling code. */
 	ret = __cpu_up(cpu, idle);
+	irq_unlock_sparse();
 	if (ret) {
 		cpu_notify(CPU_UP_CANCELED, cpu);
 		return ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ