lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.6] Fix early __might_sleep() calls
__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"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.023 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site