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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080214234832.GA14363@elte.hu>
Date:	Fri, 15 Feb 2008 00:48:32 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Yinghai Lu <yhlu.kernel@...il.com>
Cc:	Greg KH <gregkh@...e.de>, Frans Pop <elendil@...net.nl>,
	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [2.6.25-rc1] System no longer powers off after shutdown


* Yinghai Lu <yhlu.kernel@...il.com> wrote:

> after disable cpufreq, i got
> 
> ACPI: Preparing to enter system sleep state S5
> Disabling non-boot CPUs ...
> kvm: disabling virtualization on CPU1
> CPU 1 is now offline
> CPU1 is down
> kvm: disabling virtualization on CPU2
> CPU 2 is now offline
> ================> hang here.
> 
> but x86.git/mm could go through down all the cpus....
> 
> interesting...

i suspect some kobject related race, and i have the feeling this all is 
timing dependent.

Andrew started seeing reboot hangs roughly around the time when the 
kobject changes went upstream. Given that x86.git had flux in that 
timeframe too i couldnt be sure what caused them.

i have the fixlet below in x86.git but it didnt solve Andrew's problem 
so it's parking now at the end of the queue, with no clear purpose in 
life :-) If it would solve someone's problem it might be revitalized.

Note: this does not fix any particular bug i know about, it's just a 
hack.

	Ingo

------------------------------>
Subject: x86: highprio shutdown hack
From: Ingo Molnar <mingo@...e.hu>

Signed-off-by: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 arch/x86/kernel/reboot.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Index: linux-x86.q/arch/x86/kernel/reboot.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/reboot.c
+++ linux-x86.q/arch/x86/kernel/reboot.c
@@ -396,8 +396,20 @@ static void native_machine_shutdown(void
 	if (!cpu_isset(reboot_cpu_id, cpu_online_map))
 		reboot_cpu_id = smp_processor_id();
 
-	/* Make certain I only run on the appropriate processor */
-	set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
+	/*
+	 * Make certain we only run on the appropriate processor,
+	 * and with sufficient priority:
+	 */
+	{
+		struct sched_param schedparm;
+		int ret;
+
+		schedparm.sched_priority = 99;
+		ret = sched_setscheduler(current, SCHED_RR, &schedparm);
+		WARN_ON_ONCE(1);
+
+		set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
+	}
 
 	/* O.K Now that I'm on the appropriate processor,
 	 * stop all of the others.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ