Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 162034 - gentoo-sources-2.6.19-r4 - pci_get_subsys() called while pci_devices is still empty
Summary: gentoo-sources-2.6.19-r4 - pci_get_subsys() called while pci_devices is still...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Daniel Drake (RETIRED)
URL: http://www2.kernel.org/git/?p=linux/k...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-14 12:54 UTC by paapaa125
Modified: 2007-02-05 22:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (pcifix.patch,900 bytes, patch)
2007-01-25 22:21 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description paapaa125 2007-01-14 12:54:26 UTC
With gentoo-sources 2.6.19-r3 all works fine. With the new gentoo-sources 2.6.19-r4 I get this in dmesg:

PCI: Using configuration type 1 //This line is identical in both kernels
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
pci_get_subsys() called while pci_devices is still empty
... 

(There are total of 32 "pci_get_subsys..." lines). Otherwise dmesg outputs are identical. I have not encountered other symptoms.

Reproducible: Always

Steps to Reproduce:
1.Just boot.
2.
3.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2007-01-14 20:27:56 UTC
Please ignore, or remove all ide-related kernel command line arguments.
Comment 2 paapaa125 2007-01-14 23:20:25 UTC
I'd hate to just ignore those ugly lines which never showed before :)

I don't think I have any ide-related command line parameters. This is all I have:

kernel /kernel-2.6.19-gentoo-r4 root=/dev/sdb3

So is this really INVALID?
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2007-01-15 03:17:44 UTC
it might be, but let's investigate and see where they come from anyway. will post a patch when I next have some time
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2007-01-25 22:21:57 UTC
Created attachment 108154 [details, diff]
patch

please apply this patch and then post new output - should include some stack dumps
Comment 5 paapaa125 2007-01-28 09:02:25 UTC
Thanks for helping. Here is the output:

--------------

PCI: Using configuration type 1
pci_get_subsys() called while pci_devices is still empty

Call Trace:
 [<ffffffff802edcf5>]
 [<ffffffff80481e2b>]
 [<ffffffff8025800e>]
 [<ffffffff80251748>]
 [<ffffffff80307302>]
 [<ffffffff80257edc>]
 [<ffffffff8025173e>]

----------

All 32 instances are identical. I also wonder if the next patch in 2.6.20.rc4 is related:

commit 6ae4adf50380d0fc5176a76d98d324f8fa491a8f
Author: Ard van Breemen <ard@telegraafnet.nl>
Date:   Fri Jan 5 16:36:21 2007 -0800

    [PATCH] PCI: prevent down_read when pci_devices is empty
    
    The pci_find_subsys gets called very early by obsolete ide setup parameters.
    This is a bogus call since pci is not initialized yet, so the list is empty.
    But in the mean time, interrupts get enabled by down_read.  This can result in
    a kernel panic when the irq controller gets initialized.
    
    This patch checks if the device list is empty before taking the semaphore, and
    hence will not enable irq's.  Furthermore it will inform that it is called
    while pci_devices is empty as a reminder that the ide code needs to be fixed.
    
    The pci_get_subsys can get called in the same manner, and as such is patched
    in the same manner.
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2007-01-28 14:18:44 UTC
That patch is part of the same bug fix and is related. It is also included in gentoo-sources.

Please enable CONFIG_KALLSYMS so that the stack dumps are usable.
Comment 7 paapaa125 2007-01-28 19:38:38 UTC
Here it is a bit more readable:

Call Trace:
 [<ffffffff802eec90>] pci_get_subsys+0x73/0x112
 [<ffffffff804b1e53>] mod_init+0x29/0x251
 [<ffffffff8025802e>] init+0x142/0x2f9
 [<ffffffff80251758>] child_rip+0xa/0x12
 [<ffffffff803082ad>] acpi_ds_init_one_object+0x0/0x80
 [<ffffffff80257eec>] init+0x0/0x2f9
 [<ffffffff8025174e>] child_rip+0x0/0x12
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2007-01-29 20:35:34 UTC
Please attach kernel .config
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2007-01-29 20:50:04 UTC
Never mind, this must be the RNG drivers.
Comment 10 paapaa125 2007-01-29 21:39:25 UTC
You are 100% correct. I disabled "HW_RANDOM_INTEL" and the problem is now gone. When I enabled it I missed the fact that it is related to mobo, not processor. I don't have an Intel i8xx-based mobo.

Now, should the messages have shown in spite of me not having i8xx mobo or is this still a bug?
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2007-01-29 21:49:50 UTC
It's expected to be shown, as it was looking for any RNG devices on your system. It also is a bug in that it would not have found one even if it was present.
Comment 12 paapaa125 2007-01-29 21:57:31 UTC
Ok. Many thanks for your time. I'll leave this open so you can close as you seem fit.
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2007-02-05 22:20:49 UTC
fixed in gentoo-sources-2.6.19-r6