Re: [PATCH] PCI fixes for 2.6.0-test7

From: Greg KH
Date: Wed Oct 15 2003 - 13:28:58 EST


ChangeSet 1.1347.1.2, 2003/10/13 11:06:38-07:00, greg@xxxxxxxxx

PCI: fix up probe functions for synclink drivers

Can not be marked __init, must be marked __devinit or not at all.
If it is marked __init, then oops can happen by a user writing to the
"new_id" file from sysfs.


drivers/char/synclink.c | 4 ++--
drivers/char/synclinkmp.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c
--- a/drivers/char/synclink.c Wed Oct 15 11:18:47 2003
+++ b/drivers/char/synclink.c Wed Oct 15 11:18:47 2003
@@ -8020,8 +8020,8 @@

#endif /* ifdef CONFIG_SYNCLINK_SYNCPPP */

-static int __init synclink_init_one (struct pci_dev *dev,
- const struct pci_device_id *ent)
+static int __devinit synclink_init_one (struct pci_dev *dev,
+ const struct pci_device_id *ent)
{
struct mgsl_struct *info;

diff -Nru a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
--- a/drivers/char/synclinkmp.c Wed Oct 15 11:18:47 2003
+++ b/drivers/char/synclinkmp.c Wed Oct 15 11:18:47 2003
@@ -5451,8 +5451,8 @@
}


-static int __init synclinkmp_init_one (struct pci_dev *dev,
- const struct pci_device_id *ent)
+static int __devinit synclinkmp_init_one (struct pci_dev *dev,
+ const struct pci_device_id *ent)
{
if (pci_enable_device(dev)) {
printk("error enabling pci device %p\n", dev);

-
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/