lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Jun 2009 16:13:21 +0100 (BST)
From:	Troy Moure <twmoure@...pr.net>
To:	Alessandro Suardi <alessandro.suardi@...il.com>
cc:	Alexander Chiang <achiang@...com>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	linux-kernel@...r.kernel.org
Subject: Re: [2.6.31-rc1] oops in acpi_get_pci_dev


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)

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.)

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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ