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: <20080902134923.9A7EF3E6A01@basil.firstfloor.org>
Date:	Tue,  2 Sep 2008 15:49:23 +0200 (CEST)
From:	Andi Kleen <andi@...stfloor.org>
To:	torvalds@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH] [2/2] Don't complain about disabled irqs when the system has paniced


panic calls smp_send_stop which eventually calls smp_call_function_*.
smp_call_function warns about disabled interrupts. But it's legal
to call panic in this case. When this happens panic() prints
several ugly backtraces. So don't check for disabled interrupts
in panic state.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>

Index: linux/kernel/smp.c
===================================================================
--- linux.orig/kernel/smp.c
+++ linux/kernel/smp.c
@@ -216,7 +216,7 @@ int smp_call_function_single(int cpu, vo
 	int err = 0;
 
 	/* Can deadlock when called with interrupts disabled */
-	WARN_ON(irqs_disabled());
+	WARN_ON(system_state < SYSTEM_PANIC && irqs_disabled());
 
 	if (cpu == me) {
 		local_irq_save(flags);
@@ -260,7 +260,8 @@ EXPORT_SYMBOL(smp_call_function_single);
 void __smp_call_function_single(int cpu, struct call_single_data *data)
 {
 	/* Can deadlock when called with interrupts disabled */
-	WARN_ON((data->flags & CSD_FLAG_WAIT) && irqs_disabled());
+	WARN_ON(system_state < SYSTEM_PANIC &&
+		(data->flags & CSD_FLAG_WAIT) && irqs_disabled());
 
 	generic_exec_single(cpu, data);
 }
@@ -329,7 +330,7 @@ int smp_call_function_mask(cpumask_t mas
 	int slowpath = 0;
 
 	/* Can deadlock when called with interrupts disabled */
-	WARN_ON(irqs_disabled());
+	WARN_ON(system_state < SYSTEM_PANIC && irqs_disabled());
 
 	cpu = smp_processor_id();
 	allbutself = cpu_online_map;
--
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