Commit e486b6b7 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] suppress might_sleep() if oopsing

We can call might_sleep() functions on the oops handling path (under do_exit).

There seem little point in emitting spurious might_sleep() warnings into the
logs after the kernel has oopsed.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fe52f966
......@@ -4631,7 +4631,7 @@ void __might_sleep(char *file, int line)
static unsigned long prev_jiffy; /* ratelimiting */
if ((in_atomic() || irqs_disabled()) &&
system_state == SYSTEM_RUNNING) {
system_state == SYSTEM_RUNNING && !oops_in_progress) {
if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
return;
prev_jiffy = jiffies;
......
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