Skip to contentSkip to conversation

null pointer in iosapic_pci_fixup()

Linux-ia64 Xavier Bru 2 participants 2 messages Nov 26, 2001 – Nov 27, 2001

lore
Share & tools
lore

Xavier Bru

author
#0 lore raw

When a device is found behind a pci/pci bridge and this device has no IRQ decribed in the ACPI table, Linux prints a warning message:
" PCI: Couldn't map irq for (...)"
unfortunately there is a null "bridge" pointer at that point. This makes the system hang in release 2.4.9 and have a wrong print of bus , device and irq in kernel 2.4.13.

A posssible patch could be:

arch/ia64/kernel/iosapic.c +2 -2
@@ -615,8 +615,8 @@
 					       pin, vector);
 				else
 					printk(KERN_WARNING
-					       "PCI: Couldn't map irq for (B%d,I%d,P%d)o\n",
-					       bridge->bus->number, PCI_SLOT(bridge->devfn),
+					       "PCI: Couldn't map irq for (B%d,I%d,P%d)\n",
+					       dev->bus->number, PCI_SLOT(dev->devfn),
 					       pin);
 			}
 			if (vector >= 0) {
Signature · 8 lines
 Sincères salutations.
_____________________________________________________________________
 
Xavier BRU                 BULL ISD/R&D/INTEL office:     FREC B1-422
tel : +33 (0)4 76 29 77 45                    http://www-frec.bull.fr
fax : +33 (0)4 76 29 77 70                 mailto:[email protected]
addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
_____________________________________________________________________
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru

Xavier> When a device is found behind a pci/pci bridge and this Xavier> device has no IRQ decribed in the ACPI table, Linux prints a Xavier> warning message: " PCI: Couldn't map irq for (...)" Xavier> unfortunately there is a null "bridge" pointer at that Xavier> point. This makes the system hang in release 2.4.9 and have Xavier> a wrong print of bus , device and irq in kernel 2.4.13.

The previous printk() seems to suffer from the same bug. I changed both of them.

Thanks,

	--david