linux/drivers/pci
Anton Vorontsov d6141668c2 PCI: Fix oops in pci_vpd_truncate
pci_vpd_truncate() should check for dev->vpd->attr, otherwise
this might happen:

sky2 driver version 1.22
Unable to handle kernel paging request for data at address 0x0000000c
Faulting instruction address: 0xc01836fc
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c01836fc] pci_vpd_truncate+0x38/0x40
LR [c029be18] sky2_probe+0x14c/0x518
Call Trace:
[ef82bde0] [c029bda4] sky2_probe+0xd8/0x518 (unreliable)
[ef82be20] [c018a11c] local_pci_probe+0x24/0x34
[ef82be30] [c018a14c] pci_call_probe+0x20/0x30
[ef82be50] [c018a330] __pci_device_probe+0x64/0x78
[ef82be60] [c018a44c] pci_device_probe+0x30/0x58
[ef82be80] [c01aa270] really_probe+0x78/0x1a0
[ef82bea0] [c01aa460] __driver_attach+0xa4/0xa8
[ef82bec0] [c01a96ac] bus_for_each_dev+0x60/0x9c
[ef82bef0] [c01aa0b4] driver_attach+0x24/0x34
[ef82bf00] [c01a9e08] bus_add_driver+0x12c/0x1cc
[ef82bf20] [c01aa87c] driver_register+0x6c/0x110
[ef82bf30] [c018a770] __pci_register_driver+0x4c/0x9c
[ef82bf50] [c03782c8] sky2_init_module+0x30/0x40
[ef82bf60] [c0001dbc] do_one_initcall+0x34/0x1a0
[ef82bfd0] [c0362240] do_initcalls+0x38/0x58

This happens with CONFIG_SKY2=y, and "ip=on" kernel command line, so
pci_vpd_truncate() is called before late_initcall(pci_sysfs_init),
therefore ->attr isn't yet initialized.

Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-04-06 11:28:35 -07:00
..
hotplug PCI: update fakephp for bus_id removal 2009-03-26 16:00:34 -07:00
pcie PCIe: portdrv: call pci_disable_device during remove 2009-03-20 10:48:16 -07:00
.gitignore
access.c PCI: Fix oops in pci_vpd_truncate 2009-04-06 11:28:35 -07:00
bus.c PCI: Setup disabled bridges even if buses are added 2009-04-06 11:25:06 -07:00
dmar.c x86, dmar: use atomic allocations for QI and Intr-remapping init 2009-03-17 16:49:30 -07:00
hotplug-pci.c
hotplug.c
htirq.c genirq: remove sparse irq code 2008-10-16 16:53:15 +02:00
intel-iommu.c Merge git://git.infradead.org/iommu-2.6 2009-04-03 10:36:57 -07:00
intr_remapping.c Merge branch 'linus' into x86/core 2009-03-28 22:27:45 +01:00
intr_remapping.h VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
iov.c PCI-IOV: fix missing kernel-doc 2009-04-06 11:25:33 -07:00
iova.c VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
irq.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: initialize and release SR-IOV capability 2009-03-20 10:48:22 -07:00
Makefile PCI: initialize and release SR-IOV capability 2009-03-20 10:48:22 -07:00
msi.c PCI MSI: Add support for multiple MSI 2009-03-20 10:48:14 -07:00
msi.h PCI MSI: Add support for multiple MSI 2009-03-20 10:48:14 -07:00
pci-acpi.c Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
pci-driver.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-04-05 10:33:07 -07:00
pci-stub.c PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
pci-sysfs.c PCI: Setup disabled bridges even if buses are added 2009-04-06 11:25:06 -07:00
pci.c PCI: Setup disabled bridges even if buses are added 2009-04-06 11:25:06 -07:00
pci.h Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-04-01 09:47:12 -07:00
probe.c PCI: annotate pci_rescan_bus as __ref, not __devinit 2009-04-06 11:26:07 -07:00
proc.c PCI: define PCI resource names in an 'enum' 2009-01-07 11:13:01 -08:00
quirks.c PCI: don't corrupt enable_cnt when doing manual resource alignment 2009-04-06 11:27:58 -07:00
remove.c PCI: fix kernel oops on bridge removal 2009-03-26 15:55:18 -07:00
rom.c PCI: fix rom.c kernel-doc warning 2009-02-13 12:01:56 -08:00
search.c PCI: fix wrong assumption in pci_find_upstream_pcie_bridge 2009-03-20 10:48:03 -07:00
setup-bus.c PCI: Setup disabled bridges even if buses are added 2009-04-06 11:25:06 -07:00
setup-irq.c
setup-res.c PCI: allow assignment of memory resources with a specified alignment 2009-03-20 10:48:15 -07:00
slot.c PCI: enhance physical slot debug information 2009-03-19 19:29:30 -07:00
syscall.c [CVE-2009-0029] System call wrappers part 26 2009-01-14 14:15:29 +01:00