Subject : (2.6.37-rc1) amd64-agp module crashed on second load Submitter : Randy Dunlap <randy.dunlap@oracle.com> Date : 2010-11-05 0:13 Message-ID : 20101104171333.fea1f498.randy.dunlap@oracle.com References : http://marc.info/?l=linux-kernel&m=128891605213447&w=2 This entry is being used for tracking a regression from 2.6.36. Please don't close it until the problem is fixed in the mainline.
Still happens with 2.6.37-rc2-git4.
Still happens with 2.6.37-rc5.
Still happens on 2.6.37-rc7.
Just a guess, but maybe it's fixed by something along the lines of: diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 42396df..6788fdf 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c @@ -774,18 +774,23 @@ int __init agp_amd64_init(void) #else printk(KERN_INFO PFX "You can boot with agp=try_unsupported\n"); #endif + pci_unregister_driver(&agp_amd64_pci_driver); return -ENODEV; } /* First check that we have at least one AMD64 NB */ - if (!pci_dev_present(k8_nb_ids)) + if (!pci_dev_present(k8_nb_ids)) { + pci_unregister_driver(&agp_amd64_pci_driver); return -ENODEV; + } /* Look for any AGP bridge */ agp_amd64_pci_driver.id_table = agp_amd64_pci_promisc_table; err = driver_attach(&agp_amd64_pci_driver.driver); - if (err == 0 && agp_bridges_found == 0) + if (err == 0 && agp_bridges_found == 0) { + pci_unregister_driver(&agp_amd64_pci_driver); err = -ENODEV; + } } return err; }
Still happens in 2.6.38-rc3, but I just saw Florian's patch, so I'll test it.
Created attachment 46682 [details] Update of Florian's patch to 2.6.38-rc3. This update of Florian's patch fixes this bug for me. I loaded the driver 5 times without an error.
Handled-By : Florian Mickler <florian@mickler.org> Patch : https://bugzilla.kernel.org/attachment.cgi?id=46682
Fixed by commit 49495d44dfa4ba76cf7d1ed8fe84746dd9552255
merged for .38-rc7: commit 49495d44dfa4ba76cf7d1ed8fe84746dd9552255 Author: Florian Mickler <florian@mickler.org> Date: Mon Feb 7 23:29:31 2011 +0100 amd64-agp: fix crash at second module load
*** Bug 25862 has been marked as a duplicate of this bug. ***