All of lore.kernel.org
 help / color / mirror / Atom feed
* resent [PATCH][2.6] Fix early __might_sleep() calls
@ 2003-10-08  7:49 Roger Luethi
  0 siblings, 0 replies; only message in thread
From: Roger Luethi @ 2003-10-08  7:49 UTC (permalink / raw)
  To: linux-kernel, trivial

__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-08  7:49 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.