Commit 2c7b2d56 authored by Robert Love's avatar Robert Love Committed by Linus Torvalds

[PATCH] schedule() in_atomic() check

This makes the in_atomic() check in schedule() actually work.  You
merged the PREEMPT_ACTIVE bits, we just need to handle the exit() case
correctly.
parent 18277e88
......@@ -940,8 +940,17 @@ asmlinkage void schedule(void)
struct list_head *queue;
int idx;
if (unlikely(in_atomic()))
BUG();
/*
* Test if we are atomic. Since do_exit() needs to call into
* schedule() atomically, we ignore that path for now.
* Otherwise, whine if we are scheduling when we should not be.
*/
if (likely(current->state != TASK_ZOMBIE)) {
if (unlikely(in_atomic())) {
printk(KERN_ERR "bad: scheduling while atomic!\n");
dump_stack();
}
}
#if CONFIG_DEBUG_HIGHMEM
check_highmem_ptes();
......
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