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]
Date:	Fri, 23 Feb 2007 07:08:02 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Michal Piotrowski <michal.k.k.piotrowski@...il.com>
Cc:	Michal Piotrowski <michal.k.k.piotrowski@...glemail.com>,
	tglx@...utronix.de, LKML <linux-kernel@...r.kernel.org>
Subject: Re: 2.6.20-git15 BUG: soft lockup detected on CPU#0! - timers?


Michal,

* Michal Piotrowski <michal.k.k.piotrowski@...il.com> wrote:

> Here is more
> 
> hardirqs last  enabled at (30787): [<c0104249>] syscall_exit_work+0x11/0x26
> hardirqs last disabled at (30788): [<c0103fc9>] ret_from_exception+0x9/0xc
> softirqs last  enabled at (30202): [<c01265df>] __do_softirq+0xe4/0xea
> softirqs last disabled at (30193): [<c0106a75>] do_softirq+0x64/0xd1

could you please try the patch below? This is pretty much the only 
condition under which we can silently 'leak' pending softirqs, and 
trigger the new warning: if something does cond_resched_softirq() in 
non-runnable state. (which is a no-no, but nothing enforced this, so it 
could in theory happen.) So the question is, with this patch applied, do 
you get these new warnings from sched.c?

	Ingo

-------------------------->
Subject: [patch] add warning to cond_resched_softirq()
From: Ingo Molnar <mingo@...e.hu>

make sure that cond_resched_softirq() is always called with a runnable 
task - so that we do not leave softirq work pending indefinitely.

Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/sched.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -4689,6 +4689,7 @@ int __sched cond_resched_softirq(void)
 	BUG_ON(!in_softirq());
 
 	if (need_resched() && system_state == SYSTEM_RUNNING) {
+		WARN_ON(current->state != TASK_RUNNING);
 		raw_local_irq_disable();
 		_local_bh_enable();
 		raw_local_irq_enable();
-
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