LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] amd64-agp: fix crash at second module load
@ 2011-02-07 22:29 Florian Mickler
2011-02-23 8:26 ` Florian Mickler
0 siblings, 1 reply; 4+ messages in thread
From: Florian Mickler @ 2011-02-07 22:29 UTC (permalink / raw)
To: airlied; +Cc: randy.dunlap, linux-kernel, Florian Mickler
The module forgot to sometimes unregister some resources.
This fixes Bug #22882.
[Patch updated to 2.6.38-rc3 by Randy Dunlap.]
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Florian Mickler <florian@mickler.org>
---
drivers/char/agp/amd64-agp.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 9252e85..780498d 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -773,18 +773,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(amd_nb_misc_ids))
+ if (!pci_dev_present(amd_nb_misc_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;
}
--
1.7.4.rc3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] amd64-agp: fix crash at second module load
2011-02-07 22:29 [PATCH] amd64-agp: fix crash at second module load Florian Mickler
@ 2011-02-23 8:26 ` Florian Mickler
2011-02-23 8:28 ` Dave Airlie
0 siblings, 1 reply; 4+ messages in thread
From: Florian Mickler @ 2011-02-23 8:26 UTC (permalink / raw)
To: akpm; +Cc: Florian Mickler, airlied, randy.dunlap, linux-kernel
Hi Andrew,
I sent this to Dave Airlie because that is what MAINTAINERS says, but
that is probably the wrong receipient?
Regards,
Flo
On Mon, 7 Feb 2011 23:29:31 +0100
Florian Mickler <florian@mickler.org> wrote:
> The module forgot to sometimes unregister some resources.
>
> This fixes Bug #22882.
>
> [Patch updated to 2.6.38-rc3 by Randy Dunlap.]
> Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Florian Mickler <florian@mickler.org>
> ---
> drivers/char/agp/amd64-agp.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
> index 9252e85..780498d 100644
> --- a/drivers/char/agp/amd64-agp.c
> +++ b/drivers/char/agp/amd64-agp.c
> @@ -773,18 +773,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(amd_nb_misc_ids))
> + if (!pci_dev_present(amd_nb_misc_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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] amd64-agp: fix crash at second module load
2011-02-23 8:26 ` Florian Mickler
@ 2011-02-23 8:28 ` Dave Airlie
2011-02-23 8:42 ` Florian Mickler
0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2011-02-23 8:28 UTC (permalink / raw)
To: Florian Mickler; +Cc: akpm, airlied, randy.dunlap, linux-kernel
On Wed, Feb 23, 2011 at 6:26 PM, Florian Mickler <florian@mickler.org> wrote:
> Hi Andrew,
> I sent this to Dave Airlie because that is what MAINTAINERS says, but
> that is probably the wrong receipient?
>
No I just get agp blindspots, esp for the 64-bit ones since they
interact with x86.
I'll push it to Linus tomorrow.
Dave.
> Regards,
> Flo
>
> On Mon, 7 Feb 2011 23:29:31 +0100
> Florian Mickler <florian@mickler.org> wrote:
>
>> The module forgot to sometimes unregister some resources.
>>
>> This fixes Bug #22882.
>>
>> [Patch updated to 2.6.38-rc3 by Randy Dunlap.]
>> Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Signed-off-by: Florian Mickler <florian@mickler.org>
>> ---
>> drivers/char/agp/amd64-agp.c | 9 +++++++--
>> 1 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
>> index 9252e85..780498d 100644
>> --- a/drivers/char/agp/amd64-agp.c
>> +++ b/drivers/char/agp/amd64-agp.c
>> @@ -773,18 +773,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(amd_nb_misc_ids))
>> + if (!pci_dev_present(amd_nb_misc_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;
>> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] amd64-agp: fix crash at second module load
2011-02-23 8:28 ` Dave Airlie
@ 2011-02-23 8:42 ` Florian Mickler
0 siblings, 0 replies; 4+ messages in thread
From: Florian Mickler @ 2011-02-23 8:42 UTC (permalink / raw)
To: Dave Airlie; +Cc: akpm, airlied, randy.dunlap, linux-kernel
On Wed, 23 Feb 2011 18:28:21 +1000
Dave Airlie <airlied@gmail.com> wrote:
> On Wed, Feb 23, 2011 at 6:26 PM, Florian Mickler <florian@mickler.org> wrote:
> > Hi Andrew,
> > I sent this to Dave Airlie because that is what MAINTAINERS says, but
> > that is probably the wrong receipient?
> >
>
> No I just get agp blindspots, esp for the 64-bit ones since they
> interact with x86.
>
> I'll push it to Linus tomorrow.
>
> Dave.
Ah ok, I wasn't shure, because there were no commits from you over
there.
Thanks,
Flo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-23 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07 22:29 [PATCH] amd64-agp: fix crash at second module load Florian Mickler
2011-02-23 8:26 ` Florian Mickler
2011-02-23 8:28 ` Dave Airlie
2011-02-23 8:42 ` Florian Mickler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).