Re: [bug] hung bootup in various drivers, was: "2.6.21-rc5: known regressions"




* Greg KH <gregkh@xxxxxxx> wrote:

BUG: at drivers/base/driver.c:187 driver_unregister()
[<c0105ff9>] show_trace_log_lvl+0x19/0x2e
[<c01063e2>] show_trace+0x12/0x14
[<c01063f8>] dump_stack+0x14/0x16
[<c063f7e6>] driver_unregister+0x3d/0x43
[<c0488048>] pci_unregister_driver+0x10/0x5f
[<c1b5f7c7>] slgt_init+0x9b/0x1ca
[<c1b31a2d>] init+0x15d/0x2bd
[<c0105bc3>] kernel_thread_helper+0x7/0x10

Yes, we should allow the ability to call unregister_driver from within
the module_init function.

But I don't understand what is causing you to see this problem. Who
is holding the reference on the struct device at this point in time?
Is it the fact that userspace has some files open and it hasn't
released them yet?

at least in the slgt_init() case the affected codepath is trivial:

if ((rc = pci_register_driver(&pci_driver)) < 0) {
printk("%s pci_register_driver error=%d\n", driver_name, rc);
return rc;
}
pci_registered = 1;

if (!slgt_device_list) {
printk("%s no devices found\n",driver_name);
pci_unregister_driver(&pci_driver);
return -ENODEV;

slgt_device_list is NULL because no matching PCI ID is on my system (i
dont have this hardware), so the ->probe() function did not get called
at all.

i.e. a pure pci_register_driver() + pci_unregister_driver() sequence
seems to cause a hang. I.e. it seems to be a pure driver-base-core
matter.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Self reordering list in Python
    ... But holding a reference makes it impossible to free the ... I already implemented this in Python ... Terry Hancock ...
    (comp.lang.python)
  • Re: [PATCH] net: Fix sock_wfree() race
    ... opens a window in sock_wfreewhere another cpu ... might free the socket we are working on. ... holding a reference on sk. ...
    (Linux-Kernel)
  • Re: Garbage Collection Issues in long-standing services
    ... I would agree that I must be holding on to some references, ... store a reference to CS so that it can use it to send data back to the client. ... > By starting another process that allocates memory, ... it does not aggressively cleanup until the amount of physical memory ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Society Should Condemn Homosexuality
    ... He's not lying, but you are holding ... on to old wives tales promoted by religious fanatics. ... No surprise, the ... NO reference provided for stats... ...
    (alt.politics)
  • Re: Programmatically determining selected index of combobox produces null error
    ... Which line is throwing the exception? ... You can check .SelectedIndex ... Something is causing a NullReferenceException ... Reference Chapters 13 and 11. ...
    (microsoft.public.dotnet.framework.adonet)