Re: cpqphp: NULL ptr deref in cpqhpc_probe

From: Jiri Slaby
Date: Thu Jun 03 2010 - 05:26:44 EST


On 06/03/2010 11:24 AM, Jiri Slaby wrote:
> we have a system where there is a pci hotplug class device to be handled
> by cpqphp, but it is not a bridge. But in cpqhpc_probe there is:
> struct pci_bus *bus;
> ...
> bus = pdev->subordinate;
> ...
> bus->max_bus_speed = PCI_SPEED_66MHz_PCIX;
>
> But as it is not a bridge, subordinate is NULL and the kernel crashes.
>
> Any idea what would be a correct fix here?
>
> The bugzilla entry is at:
> https://bugzilla.novell.com/show_bug.cgi?id=609338

I forgot to attach the device information:
00:0b.0 PCI Hot-plug controller: Compaq Computer Corporation PCI Hotplug
Controller (rev 11)
Subsystem: Compaq Computer Corporation Device a2f8
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 15
Region 0: Memory at f7ad0000 (32-bit, non-prefetchable) [size=256]

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