mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jun Sun <julian_sun@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: I hit the BUG() in schedule() ...
Date: Tue, 19 Jun 2001 23:30:08 -0700 (PDT)	[thread overview]
Message-ID: <20010620063008.93936.qmail@web13908.mail.yahoo.com> (raw)


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/

                 reply	other threads:[~2001-06-20  6:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010620063008.93936.qmail@web13908.mail.yahoo.com \
    --to=julian_sun@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®