Ok. Let's just make the masking explicit in in_atomic() then, like you
> Simplest solution is to:
> #define in_atomic() \
> (preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
> although I still dislike the masking just to make the schedule()
> code-path cleaner.
I don't think this is a scheduler cleanliness issue: it's a consistency
issue. If "in_interrupt()" and friends do not care about PREEMPT_ACTIVE,
then neither should "in_atomic()". The fact that the scheduler test gets
cleaned up is secondary - although it is obviously a result of being
> Oh, and there is another problem: printk() from schedule() implicitly
> calls wake_up(). My machine dies even with just a printk() and not a
> BUG()... I suspect there may be some SMP issue in that whole mess too,
> because setting oops_in_progress prior did not help.
Hmm.. It will call wake_up() because it will try to wake up any klogd.
What's the problem? Calling wake_up() should be fine from there..
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/