All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Troy Moure <twmoure@szypr.net>
Cc: Alessandro Suardi <alessandro.suardi@gmail.com>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [2.6.31-rc1] oops in acpi_get_pci_dev
Date: Thu, 25 Jun 2009 10:41:09 -0600	[thread overview]
Message-ID: <20090625164109.GK17633@ldl.fc.hp.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0906251548300.2760@troy-laptop>

* Troy Moure <twmoure@szypr.net>:
> Alessandro Suardi wrote:
> > On boot:
> ...
> > kernel: BUG: unable to handle kernel NULL pointer dereference at
> > 0000000000000018
> > kernel: IP: [<ffffffff8121b556>] acpi_get_pci_dev+0x113/0x17
> ...
> > Dell Latitude E6400 x86_64 SMP with Fedora 11 userspace.
> 
> > Box continues working after Oops, but locks up when exiting X session.
> 
> > 2.6.30-git22 works fine (probably because acpi_get_pci_dev is
> > introduced in -rc1)

Sorry about this panic. I was nervous about touching the ACPI
backlight stuff, and with good reason, it seems.

> I've encountered what seems to be the same issue (a NULL pointer 
> dereference in acpi_get_pci_dev()).  In my case, it caused a kernel panic 
> during boot (so I don't have any text logs to attach).
> 
> In my case, pci_get_slot() is returning a NULL pointer that  
> acpi_get_pci_dev() doesn't check for.  The following patch fixes things 
> for me.  Does it work for you, Alessandro?
> 
> (I don't know if it's the "right" fix or not, not being familiar with the 
> system.  If it is, I can send it in as a proper patch.)

Let me have a think about this.

Thanks.

/ac

> 
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index 8a5bf3b..55b5b90 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
> @@ -395,7 +395,7 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
>  		fn  = adr & 0xffff;
>  
>  		pdev = pci_get_slot(pbus, PCI_DEVFN(dev, fn));
> -		if (hnd == handle)
> +		if (!pdev || hnd == handle)
>  			break;
>  
>  		pbus = pdev->subordinate;
> 

  parent reply	other threads:[~2009-06-25 16:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-25 15:13 [2.6.31-rc1] oops in acpi_get_pci_dev Troy Moure
2009-06-25 16:02 ` Jeff Chua
2009-06-25 18:59   ` Alex Chiang
2009-06-25 21:32     ` Alessandro Suardi
2009-06-25 16:41 ` Alex Chiang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-06-25 10:25 Alessandro Suardi
2009-06-24 15:02 ` Pavel Machek
2009-06-27 18:55   ` Alex Chiang

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=20090625164109.GK17633@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=alessandro.suardi@gmail.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=twmoure@szypr.net \
    /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.