diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-09-29 02:19:51 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-29 02:19:51 -0700 |
| commit | ca61a009a128ed6c0aaa00f9bd444deb54db1eaa (patch) | |
| tree | 311bd662673cb3f3fc3516f77a12ed79c2b3c3dd /kernel | |
| parent | e4c0058e8a53b176408bcb879a90fd431336319d (diff) | |
[PATCH] additional might_sleep checks
- Dave says that lock_sock() inside locks is a popular bug. Put a
check there.
- Also in wait_for_completion().
- Add the text "Debug" to the warning message so people are less
likely to think that they've oopsed.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 44d4929ca677..aa13d6a55721 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1163,6 +1163,7 @@ void complete(struct completion *x) void wait_for_completion(struct completion *x) { + might_sleep(); spin_lock_irq(&x->wait.lock); if (!x->done) { DECLARE_WAITQUEUE(wait, current); @@ -2158,7 +2159,7 @@ void __might_sleep(char *file, int line) if (time_before(jiffies, prev_jiffy + HZ)) return; prev_jiffy = jiffies; - printk("Sleeping function called from illegal" + printk(KERN_ERR "Debug: sleeping function called from illegal" " context at %s:%d\n", file, line); dump_stack(); } |
