public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6] Fix early __might_sleep() calls
@ 2003-10-06 19:52 Roger Luethi
  0 siblings, 0 replies; only message in thread
From: Roger Luethi @ 2003-10-06 19:52 UTC (permalink / raw)
  To: linux-kernel

__might_sleep prints warnings only after jiffies wrap (typically after 5
minutes of uptime).

Patch against 2.6 CVS.

Roger

--- linux-2.5/kernel/sched.c.orig	2003-10-06 20:58:47.258167317 +0200
+++ linux-2.5/kernel/sched.c	2003-10-06 21:31:32.676707449 +0200
@@ -2847,7 +2847,7 @@ void __might_sleep(char *file, int line)
 	static unsigned long prev_jiffy;	/* ratelimiting */
 
 	if (in_atomic() || irqs_disabled()) {
-		if (time_before(jiffies, prev_jiffy + HZ))
+		if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
 			return;
 		prev_jiffy = jiffies;
 		printk(KERN_ERR "Debug: sleeping function called from invalid"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-06 19:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06 19:52 [PATCH][2.6] Fix early __might_sleep() calls Roger Luethi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox