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-prev] [day] [month] [year] [list]
Message-ID: <5a4c581d0906251432s77703a20ndaa34c10ef1d5ebd@mail.gmail.com>
Date:	Thu, 25 Jun 2009 23:32:03 +0200
From:	Alessandro Suardi <alessandro.suardi@...il.com>
To:	Alex Chiang <achiang@...com>
Cc:	Jeff Chua <jeff.chua.linux@...il.com>,
	Troy Moure <twmoure@...pr.net>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	linux-kernel@...r.kernel.org, jbarnes@...tuousgeek.org,
	lenb@...nel.org
Subject: Re: [2.6.31-rc1] oops in acpi_get_pci_dev

On Thu, Jun 25, 2009 at 8:59 PM, Alex Chiang<achiang@...com> wrote:
> Hi Jeff, Alessandro,
>
> First, thanks for reporting this bug, and apologies for the
> inconvenience.

No problem - that's why we're trying out prerelease kernels :)

> * Jeff Chua <jeff.chua.linux@...il.com>:
>> On Thu, Jun 25, 2009 at 11:13 PM, Troy Moure<twmoure@...pr.net> wrote:
>> > (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;
>
> I'm a little hesitant to do this (yet), because it means one of
> my assumptions was wrong.
>
> Can you please try this debug patch and send me the dmesg output?
> Please boot with 'debug'. I did add the same NULL check so you
> shouldn't crash, and can send me the output after you're done
> booting up.
>
> Also, if you could include the output of 'lspci -v', that would
> be great too.
>
> Thanks.
>
> /ac
>
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index 8a5bf3b..7674987 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
> @@ -355,12 +355,20 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
>        struct pci_dev *pdev = NULL;
>        struct acpi_handle_node *node, *tmp;
>        struct acpi_pci_root *root;
> +       struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
>        LIST_HEAD(device_list);
>
>        /*
>         * Walk up the ACPI CA namespace until we reach a PCI root bridge.
>         */
>        phandle = handle;
> +
> +       acpi_get_name(phandle, ACPI_FULL_PATHNAME, &buffer);
> +       printk("Starting root bridge search from %s\n", (char *)buffer.pointer);
> +       kfree(buffer.pointer);
> +       buffer.pointer = NULL;
> +       buffer.length = 0;
> +
>        while (!acpi_is_root_bridge(phandle)) {
>                node = kzalloc(sizeof(struct acpi_handle_node), GFP_KERNEL);
>                if (!node)
> @@ -370,6 +378,12 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
>                node->handle = phandle;
>                list_add(&node->node, &device_list);
>
> +               acpi_get_name(phandle, ACPI_FULL_PATHNAME, &buffer);
> +               printk("+ Adding %s\n", (char *)buffer.pointer);
> +               kfree(buffer.pointer);
> +               buffer.pointer = NULL;
> +               buffer.length = 0;
> +
>                status = acpi_get_parent(phandle, &phandle);
>                if (ACPI_FAILURE(status))
>                        goto out;
> @@ -380,6 +394,7 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
>                goto out;
>
>        pbus = root->bus;
> +       dev_info(&pbus->dev, "I'm a little pci_bus, short and stout...\n");
>
>        /*
>         * Now, walk back down the PCI device tree until we return to our
> @@ -394,7 +409,16 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
>                dev = (adr >> 16) & 0xffff;
>                fn  = adr & 0xffff;
>
> +               printk("Searching for %04x:%02x:%02x.%d\n",
> +                       pci_domain_nr(pbus), pbus->number,
> +                       PCI_SLOT(PCI_DEVFN(dev, fn)),
> +                       PCI_FUNC(PCI_DEVFN(dev, fn)));
> +
>                pdev = pci_get_slot(pbus, PCI_DEVFN(dev, fn));
> +               if (!pdev) {
> +                       printk("Ouch.\n");
> +                       break;
> +               }
>                if (hnd == handle)
>                        break;
>
>

I'm not sure what you mean by "boot with debug" - so I'm attaching
 the output of dmesg from a 2.6.31-rc1 plus your patch ordinary boot,
 (which doesn't crash) and lspci -v -- hoping it's enough... and if it
 isn't just please explain what I should do (and I'll do that tomorrow).

Thanks,

--alessandro

 "And if a God will lay to rest anywhere we want to go
  In your house I long to be, room by room, patiently"

   (Audioslave, "Like A Stone")

Download attachment "dmesg-2631rc1-acpidebug" of type "application/octet-stream" (45165 bytes)

Download attachment "lspci-2631rc1" of type "application/octet-stream" (10389 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ