On Wed, Jan 28, 2004 at 10:06:25PM -0200, Marcelo Tosatti wrote:
> On Wed, 28 Jan 2004, Christoph Hellwig wrote:
> > > - Mark pci_device_id list with __devinitdata
> >
> > This is bogus and can crash the kernel if you're unlucky.
>
> Other wan drivers are doing the same:
>
> [marcelo _at_ logos wan]$ grep __devinitdata *
> farsync.c:static char *type_strings[] __devinitdata = {
> wanxl.c:static struct pci_device_id wanxl_pci_tbl[] __devinitdata = {
>
> I believe a handful of others are using "__devinitdata". How can the
> kernel crash because of this? Who will try to touch the data?
It is particularly notable when someone inserts a Cardbus device. A
new PCI device is added, and we scan all drivers looking for a match
using the PCI ID tables.
If _any_ PCI ID table which is part registered as part of a driver is
marked using __devinitdata or __initdata, this will either cause the
kernel to read invalid data (possibly entering a long loop) or oops.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: [PATCH] PC300 updateRussell King
- [PATCH] PC300 updateMarcelo Tosatti
- Re: [PATCH] PC300 updateChristoph Hellwig
- Re: [PATCH] PC300 updateMarcelo Tosatti
- Prev by Date: Re: [BK PATCH] i2c driver fixes for 2.6.2-rc2
- Next by Date: Re: SECURITY - data leakage due to incorrect strncpy implementation
- Previous by thread: Re: [PATCH] PC300 update
- Next by thread: Re: [PATCH] PC300 update
- Indexes:[Main][Thread]