Commit 517251c1 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix early __might_sleep() calls

From: Roger Luethi <rl@hellgate.ch>

__might_sleep prints warnings only after jiffies wrap (typically after 5
minutes of uptime).
parent de8c4ff8
......@@ -2849,7 +2849,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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment