linux/drivers
Youquan,Song 46256f83d0 PCI: AER: fix aer inject result in kernel oops
If the BIOS does not export _OSC to allow OS take over the PCIe AER, the
pcie aer driver will not initialize the aer service. However, the
aer_inject driver does not check this scenario, which results in a kernel
oops when injecting an aer error into OS.  For example:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000350
IP: [<ffffffff812e08f7>] _spin_lock_irqsave+0xc/0x23
PGD 155c41067 PUD 157fe0067 PMD 0
Oops: 0002 [#1] SMP
Pid: 5119, comm: aer-inject Not tainted 2.6.32-rc8-mce #2
RIP: 0010:[<ffffffff812e08f7>]  [<ffffffff812e08f7>] _spin_lock_irqsave+0xc/0x23
RSP: 0018:ffff880157f81e28  EFLAGS: 00010096
RAX: 0000000000000296 RBX: 0000000000000000 RCX: 0000000000000100
RDX: 0000000000010000 RSI: 0000000000000246 RDI: 0000000000000350
RBP: ffff880157f81e28 R08: 0000000000000004 R09: ffff880157f81dac
R10: ffff88015a666f60 R11: ffff88015a666f40 R12: ffff88015758cc00
R13: 0000000000000350 R14: 0000000000000000 R15: 0000000000000100
FS:  00007f4d4a66e6f0(0000) GS:ffff8800282e0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000350 CR3: 000000015661a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process aer-inject (pid: 5119, threadinfo ffff880157f80000, task ffff8801585f4340)
Stack:
 ffff880157f81e78 ffffffff811b1615 ffff880157f81e78 ffffffff81222823
Call Trace:
 [<ffffffff811b1615>] aer_irq+0x38/0x117
 [<ffffffff81222823>] ? device_for_each_child+0x5f/0x6f
 [<ffffffffa00967bf>] aer_inject_write+0x409/0x45e [aer_inject]
 [<ffffffff810eb80e>] vfs_write+0xae/0x16a
 [<ffffffff810eb98e>] sys_write+0x47/0x6e
 [<ffffffff8100ba2b>] system_call_fastpath+0x16/0x1b
RIP  [<ffffffff812e08f7>] _spin_lock_irqsave+0xc/0x23
 RSP <ffff880157f81e28>
CR2: 0000000000000350

So check the _OSC before assuming that AER is available to the OS.

Signed-off-by: Youquan, Song <youquan.song@intel.com>
Acked-by: Ying, Huang <ying.huang@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-04 08:31:46 -08:00
..
accessibility
acpi Merge branch 'resume-sci-force-bootparam' into release 2009-12-30 18:32:32 -05:00
amba
ata Merge branch 'misc-2.6.33' into release 2009-12-24 01:19:00 -05:00
atm
auxdisplay
base devtmpfs: unlock mutex in case of string allocation error 2009-12-23 11:23:44 -08:00
block aoe: switch to the new bio_flush_dcache_pages() interface 2009-12-22 09:12:48 +01:00
bluetooth Bluetooth: Prevent ill-timed autosuspend in USB driver 2009-12-17 12:12:49 -08:00
cdrom
char Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-31 11:54:13 -08:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2009-12-30 13:46:29 -08:00
edac edac, pci: remove pesky debug printk 2009-12-24 11:07:09 +01:00
eisa
firewire firewire, ieee1394: update Kconfig help 2009-12-29 19:58:17 +01:00
firmware
gpio
gpu Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2009-12-23 08:59:32 -08:00
hid
hwmon Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-12-17 16:48:08 -08:00
i2c i2c-omap: OMAP3: Fix I2C lockup during timeout/error cases 2009-12-24 01:30:54 +00:00
ide
idle cpumask: convert drivers/idle/i7300_idle.c to cpumask_var_t 2009-12-17 11:43:25 +10:30
ieee1394 firewire, ieee1394: update Kconfig help 2009-12-29 19:58:17 +01:00
ieee802154
infiniband kfifo: fix warn_unused_result 2009-12-22 14:17:56 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-12-31 11:12:35 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-21 10:12:25 -08:00
leds leds: leds-pwm: Set led_classdev max_brightness 2009-12-17 11:42:34 +00:00
lguest
macintosh
mca
md md: allow a resync that is waiting for other resync to complete, to be aborted. 2009-12-30 15:25:23 +11:00
media firewire: fix use of multiple AV/C devices, allow multiple FCP listeners 2009-12-29 19:58:16 +01:00
memstick
message
mfd twl4030-irq.c: fix compiler warning due to raw-spinlock conversion 2009-12-31 17:26:05 -08:00
misc Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-12-17 16:38:48 -08:00
mmc sdhci-of: add support for the wii sdhci controller 2009-12-17 15:45:32 -08:00
mtd Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2009-12-17 16:38:06 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-30 12:37:35 -08:00
nubus
of
oprofile
parisc
parport
pci PCI: AER: fix aer inject result in kernel oops 2010-01-04 08:31:46 -08:00
pcmcia Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-30 13:13:24 -08:00
platform dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should follow 0/-E convention 2009-12-30 12:42:53 -08:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2009-12-16 12:33:19 -08:00
power
pps
ps3
rapidio
regulator regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode() 2009-12-17 10:27:30 +00:00
rtc Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2009-12-17 16:38:06 -08:00
s390 [S390] Use strim instead of strstrip to avoid false warnings. 2009-12-18 17:43:33 +01:00
sbus
scsi kfifo: fix warn_unused_result 2009-12-22 14:17:56 -08:00
serial serial: sh-sci: Convert tremaining ctrl_xxx I/O routines to __raw_xxx. 2009-12-24 14:52:43 +09:00
sfi
sh
sn
spi Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2009-12-17 15:59:05 -08:00
ssb
staging Staging/vt66*: kconfig, depends on WLAN 2009-12-23 11:27:50 -08:00
tc
telephony
thermal Merge branch 'misc-2.6.33' into release 2009-12-16 14:22:32 -05:00
uio
usb USB: Fix a bug on appledisplay.c regarding signedness 2009-12-23 11:34:20 -08:00
uwb
video VIDEO: cyberpro: pci_request_regions needs a persistent name 2009-12-24 18:34:09 +00:00
virtio
vlynq
w1
watchdog [WATCHDOG] use resource_size() 2009-12-23 19:53:04 +00:00
xen
zorro
Kconfig firewire, ieee1394: update Kconfig help 2009-12-29 19:58:17 +01:00
Makefile