linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* I hit the BUG() in schedule() ...
@ 2001-06-20  6:30 Jun Sun
  0 siblings, 0 replies; only message in thread
From: Jun Sun @ 2001-06-20  6:30 UTC (permalink / raw)
  To: linux-kernel


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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-20  6:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-20  6:30 I hit the BUG() in schedule() Jun Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).