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: <87psa9z0wu.fsf@duaron.myhome.or.jp>
Date:	Mon, 25 Dec 2006 01:58:09 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	"Fabio Comolli" <fabio.comolli@...il.com>
Cc:	"kernel list" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...l.org>
Subject: Re: BUG: scheduling while atomic - Linux 2.6.20-rc2-ga3d89517

"Fabio Comolli" <fabio.comolli@...il.com> writes:

> Just found this in syslog. It was during normal activity, about 6
> minutes after resume-from-ram. I never saw this before.

It seems someone missed to check PREEMPT_ACTIVE in __resched_legal().
Could you please test the following patch?
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>



Signed-off-by: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
---

 kernel/sched.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN kernel/sched.c~__resched_legal kernel/sched.c
--- linux-2.6/kernel/sched.c~__resched_legal	2006-12-24 22:40:19.000000000 +0900
+++ linux-2.6-hirofumi/kernel/sched.c	2006-12-24 23:54:01.000000000 +0900
@@ -4619,10 +4619,11 @@ asmlinkage long sys_sched_yield(void)
 
 static inline int __resched_legal(int expected_preempt_count)
 {
-#ifdef CONFIG_PREEMPT
+#ifndef CONFIG_PREEMPT
+	expected_preempt_count = 0;
+#endif
 	if (unlikely(preempt_count() != expected_preempt_count))
 		return 0;
-#endif
 	if (unlikely(system_state != SYSTEM_RUNNING))
 		return 0;
 	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