Skip to contentSkip to conversation

Fix non-terminated PCI match table in PowerMac IDE

PATCH New Benjamin Herrenschmidt 1 participant 1 message Oct 6, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix non-terminated PCI match table in PowerMac IDE

The PCI device table in the powermac IDE driver isn't properly terminated. Depending on how your kernel is linked and other random factors, you can end up with this driver matched against any other PCI device in your system, possibly crashing at boot.

Thanks to Heikki for tracking this down with me, the bug have been there for some time, though it rarely hurts due to luck. In this case, the switch from .22 to .23-rc9 is causing it to show up due to differences in the resulting layout of .data I suppose.

---

If that can still make it in .23, that would be great. I'll also get it in the various -stable releases.

drivers/ide/ppc/pmac.c +1 -0
index f19eb6d..2fb047b 100644
@@ -1546,6 +1546,7 @@ static struct pci_device_id pmac_ide_pci_match[] = {
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{},
 };
 
 static struct pci_driver pmac_ide_pci_driver = {