linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Meelis Roos <mroos@linux.ee>
Cc: Rob Herring <rob.herring@calxeda.com>,
	sparclinux@vger.kernel.org,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: OF-related boot crash in 3.3.0-rc3-00188-g3ec1e88
Date: Mon, 13 Feb 2012 14:46:23 -0700	[thread overview]
Message-ID: <20120213214623.GJ11077@ponder.secretlab.ca> (raw)
In-Reply-To: <alpine.SOC.1.00.1202131119040.1488@math.ut.ee>

On Mon, Feb 13, 2012 at 11:20:36AM +0200, Meelis Roos wrote:
> > Try the following patch.  I suspect the new of_alias_scan() isn't careful
> > enough about which properties it dereferences:
> > 
> > ---
> > 
> > diff --git a/drivers/of/base.c b/drivers/of/base.c
> > index 133908a..9188caa 100644
> > --- a/drivers/of/base.c
> > +++ b/drivers/of/base.c
> > @@ -1174,6 +1174,10 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
> >  		    !strcmp(pp->name, "linux,phandle"))
> >  			continue;
> >  
> > +		/* Check for null value or non-strings (no null termination) */
> > +		if (!pp->value || strnlen(pp->value, pp->length) == pp->length)
> > +			continue;
> > +
> >  		np = of_find_node_by_path(pp->value);
> >  		if (!np)
> >  			continue;
> > 
> 
> Yes, it probably gets past this problem but oopses in a different place:
> 
> [    0.000000] PROMLIB: Sun IEEE Boot Prom 'OBP 3.2.30 2002/10/25 14:03'
> [    0.000000] PROMLIB: Root node compatible: 
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Linux version 3.3.0-rc3-00188-g3ec1e88-dirty (mroos@korvits) (gcc version 4.6.2 (Debian 42
> [    0.000000] debug: ignoring loglevel setting.
> [    0.000000] bootconsole [earlyprom0] enabled
> [    0.000000] ARCH: SUN4U
> [    0.000000] Ethernet address: 08:00:20:b6:ee:e2
> [    0.000000] Kernel: Using 4 locked TLB entries for main kernel image.
> [    0.000000] Remapping the kernel... done.
> [    0.000000] Unable to handle kernel NULL pointer dereference
> [    0.000000] tsk->{mm,active_mm}->context = 0000000000000000
> [    0.000000] tsk->{mm,active_mm}->pgd = fffff800008c77d0
> [    0.000000]               \|/ ____ \|/
> [    0.000000]               "@'/ .. \`@"
> [    0.000000]               /_| \__/ |_\
> [    0.000000]                  \__U_/
> [    0.000000] swapper(0): Oops [#1]
> [    0.000000] TSTATE: 0000000080e01606 TPC: 0000000000645810 TNPC: 0000000000645814 Y: 00000037    Not d
> [    0.000000] TPC: <of_find_node_by_phandle+0x30/0x60>

Ugh; that looks bad.  If it failed there, then the global device node list
is corrupted.  I hate to ask you this, but would you be able to git bisect to
narrow down the commit that causes the problem?

g.

  reply	other threads:[~2012-02-13 21:46 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 20:56 [PATCH v3.3-rc5] memblock: Fix size aligning of memblock_alloc_base_nid() Tejun Heo
2012-02-13  7:45 ` OF-related boot crash in 3.3.0-rc3-00188-g3ec1e88 Meelis Roos
2012-02-13  8:06   ` Grant Likely
2012-02-13  9:20     ` Meelis Roos
2012-02-13 21:46       ` Grant Likely [this message]
2012-02-14  0:58         ` David Miller
2012-02-14  2:30           ` Grant Likely
2012-02-14  2:41             ` Grant Likely
2012-02-16 21:08             ` mroos
2012-02-14  5:54           ` mroos
2012-02-16 19:53         ` Meelis Roos
2012-02-16 21:23           ` Sam Ravnborg
2012-02-20  9:11           ` Meelis Roos
2012-02-20 17:06             ` Tejun Heo
2012-02-20 20:04               ` Meelis Roos
2012-02-20 21:01                 ` Tejun Heo
2012-02-20 22:32               ` Meelis Roos
2012-02-21  1:05                 ` Tejun Heo
2012-02-22  0:36                   ` Meelis Roos
2012-02-22 17:48                     ` Tejun Heo
2012-02-22 18:25                       ` Meelis Roos
2012-02-23 18:55                         ` Tejun Heo
2012-02-23 23:31                           ` David Miller
2012-02-24  9:20                           ` Meelis Roos
2012-02-27 17:17                             ` Meelis Roos
2012-02-27 19:43                               ` Sam Ravnborg
2012-02-27 21:25                                 ` Meelis Roos
2012-02-27 21:30                                   ` David Miller
2012-02-28 21:10                                     ` David Miller
2012-02-28 21:36                                       ` Meelis Roos
2012-02-28 22:56                                         ` David Miller
2012-02-29  6:15                                           ` Meelis Roos
2012-02-29  6:27                                             ` David Miller
2012-02-22 20:44                       ` David Miller
2012-02-22 21:00                         ` Tejun Heo
2012-02-22 18:22                     ` Richard Mortimer
2012-02-22 20:26                       ` David Miller
2012-02-22 17:03                   ` Sam Ravnborg
2012-02-22 17:12                     ` Meelis Roos
2012-02-22 17:21                       ` Sam Ravnborg
2012-02-22 17:41                         ` Meelis Roos
2012-02-13  9:50     ` Meelis Roos
2012-02-13  9:51       ` Meelis Roos
2012-02-13 10:35       ` Meelis Roos
2012-03-01 12:24   ` [tip:core/urgent] memblock: Fix size aligning of memblock_alloc_base_nid() tip-bot for Tejun Heo
2012-02-28 22:16 ` [PATCH v3.3-rc5] " Sam Ravnborg

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=20120213214623.GJ11077@ponder.secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=rob.herring@calxeda.com \
    --cc=sparclinux@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;
as well as URLs for NNTP newsgroup(s).