I hit the BUG() in schedule() ...
I am running a MIPS machine and hit the following BUG() in kernel/sched.c:650:
prepare_to_switch();
{
struct mm_struct *mm = next->mm;
struct mm_struct *oldmm = prev->active_mm;
if (!mm) {
if (next->active_mm) BUG(); <======
next->active_mm = oldmm;
atomic_inc(&oldmm->mm_count);
enter_lazy_tlb(oldmm, next, this_cpu);
} else {
if (next->active_mm != mm) BUG();
switch_mm(oldmm, mm, next, this_cpu);
}The "next" processor is swapper.
I have not looked at it hard enough, but an initial investigation seems to reveal the cause trivially.
In include/linux/sched.h, the "swapper" task is set such that 'mm' is NULL and 'active_mm' is &init_mm. So obviously when we switch back to "swapper" task, we will hit the BUG().
That sounds little too obvious to be true. What am I missing here?
Thanks in advance. Please cc your reply to this email account. I appreciate that.
Jun
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/