All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: frankeh@watson.ibm.com, linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: SMP BUG
Date: Wed, 15 Feb 2006 15:17:16 -0800	[thread overview]
Message-ID: <20060215151716.201da5de.akpm@osdl.org> (raw)
In-Reply-To: <20060215230701.GD1508@flint.arm.linux.org.uk>

Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> On Mon, Feb 13, 2006 at 07:19:19PM -0500, Hubertus Franke wrote:
> > Folks the change introduced in 2.6.16-rc2   over 2.6.15
> > wrt to the SMP initialization are wrong.
> > Please apply to unroll the change..
> > 
> > Here is the logic ...
> > sched_init is called from start_kernel before the
> > architecture specific function cpu_check_smp() is called
> > which is done as part of rest_init().
> > 
> > On s390 this actually sets the cpu_possible_map, which
> > is now used in sched_init through the for_each_cpu without
> > properly being initialized.
> > As a result bringing 2nd and subsequent cpu online
> > breaks.
> > 
> > This should be a quick fix, until this chicken and egg
> > problem is solved otherwise.
> > 
> > -- Hubertus
> > 
> > --- kernel/sched.c.orig 2006-02-13 19:08:28.000000000 -0500
> > +++ kernel/sched.c      2006-02-13 19:09:08.000000000 -0500
> > @@ -6111,7 +6111,7 @@ void __init sched_init(void)
> >         runqueue_t *rq;
> >         int i, j, k;
> > 
> > -       for_each_cpu(i) {
> > +       for (i = 0; i < NR_CPUS; i++ ) {
> >                 prio_array_t *array;
> > 
> >                 rq = cpu_rq(i);
> 
> (left most of the message intact because it seems to have been ignored.
> Copying Linus and akpm in the vague hope of a response.)

This has already been fixed in s390.

> Yes, I'm also seeing an oops caused by exactly this on ARM:
> 
> ...
>
> enqueue_task is being called with p = c03fe2e0, array = NULL, leading
> to a NULL pointer dereference because rq->array has not been initialised.

Is arm's setup_arch() populating cpu_possible_map?

If that's not possible, statically initialising it to CPU_MASK_ALL should
fix it, but that's a lame solution and might lead to wastage of per-cpu
memory on not-possible CPUs.


  reply	other threads:[~2006-02-15 23:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14  0:19 SMP BUG Hubertus Franke
2006-02-15 23:07 ` Russell King
2006-02-15 23:17   ` Andrew Morton [this message]
2006-02-15 23:34     ` Russell King
2006-02-15 23:23   ` Linus Torvalds
2006-02-15 23:30     ` Andrew Morton
2006-02-15 23:37       ` Russell King
2006-02-15 23:46         ` Andrew Morton
2006-02-16  0:14           ` Russell King
2006-02-16  0:28             ` Andrew Morton
2006-02-16  0:52       ` Linus Torvalds
2006-02-16  3:29         ` Nick Piggin
2006-02-16  8:37     ` Ingo Molnar
2006-02-16 10:20     ` Russell King
2006-02-16 15:54       ` Linus Torvalds

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=20060215151716.201da5de.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=frankeh@watson.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.