On Sat, Jun 21, 2025 at 04:55:52AM +0300, Ahmed Salem wrote:
> --- a/drivers/char/agp/amd64-agp.c
> +++ b/drivers/char/agp/amd64-agp.c
> @@ -768,10 +768,15 @@ int __init agp_amd64_init(void)
>  
>               /* 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 ((int *)agp_amd64_pci_driver.probe != 0) {
>                       pci_unregister_driver(&agp_amd64_pci_driver);
>                       err = -ENODEV;
> +             } else {
> +                     err = driver_attach(&agp_amd64_pci_driver.driver);
> +                     if (err == 0 && agp_bridges_found == 0) {
> +                             pci_unregister_driver(&agp_amd64_pci_driver);
> +                             err = -ENODEV;
> +                     }

Is the "probe" member in agp_amd64_pci_driver overwritten with a
zero pointer anywhere?  I don't see that it is, so it seems the
else-branch is never entered.

I had already prepared a fix for this, but waited for 0-day to
crunch through it.  I've just submitted it, so that's what I had
in mind:

https://lore.kernel.org/r/f8ff40f35a9a5836d1371f60e85c09c5735e3c5e.1750497201.git.lu...@wunner.de/

Thanks,

Lukas

Reply via email to