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, 10 Apr 2009 13:41:34 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Maciej Rutecki <maciej.rutecki@...il.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-bluetooth@...r.kernel.org, marcel@...tmann.org
Subject: Re: [2.6.29-git12] BUG: scheduling while atomic:
 swapper/0/0x10000100

On Fri, 10 Apr 2009, Maciej Rutecki wrote:

> 2009/4/10 Andrew Morton <akpm@...ux-foundation.org>
> 
> > Did this get fixed?
> 
> On 2.6.30-rc1-git3 still the same:
> [  162.541793] BUG: scheduling while atomic: swapper/0/0x10000100

Yikes.	

0x10000100
       ^----- softirq count leaked.

We have a check for that in do_softirq, but none in do_IRQ. Can you
please apply the patch below and test whether it triggers ?

Thanks,

	tglx
---
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index c3fe010..d164396 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -206,6 +206,7 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
 	/* high bit used in ret_from_ code  */
 	unsigned vector = ~regs->orig_ax;
 	unsigned irq;
+	int prev_count = preempt_count();
 
 	exit_idle();
 	irq_enter();
@@ -225,6 +226,13 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
 
 	irq_exit();
 
+	if (unlikely(prev_count != preempt_count())) {
+		printk(KERN_ERR "huh, entered interrupt %d"
+		       "with preempt_count %08x, exited with %08x?\n", irq,
+		       prev_count, preempt_count());
+		preempt_count() = prev_count;
+	}
+
 	set_irq_regs(old_regs);
 	return 1;
 }

--
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