linux/drivers/watchdog
Jiri Slaby d406577526 watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME
Some systems don't provide DMI_BOARD_NAME in their DMI tables. Avoid
crash in such situations in fitpc2_wdt_init.

The fix is to check if the dmi_get_system_info return value is NULL.

The oops:
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffff81253ae6>] strstr+0x26/0xa0
PGD 3966e067 PUD 39605067 PMD 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
CPU 1
Modules linked in: ...
Pid: 1748, comm: modprobe Not tainted 2.6.37-22-default #1 /Bochs
RIP: 0010:[<ffffffff81253ae6>]  [<ffffffff81253ae6>] strstr+0x26/0xa0
RSP: 0018:ffff88003ad73f18  EFLAGS: 00010206
RAX: 0000000000000000 RBX: 00000000ffffffed RCX: 00000000ffffffff
RDX: ffffffffa003f4cc RSI: ffffffffa003f4c2 RDI: 0000000000000000
...
CR2: 0000000000000000 CR3: 000000003b7ac000 CR4: 00000000000006e0
...
Process modprobe (pid: 1748, threadinfo ffff88003ad72000, task ffff88002e6365c0)
Stack: ...
Call Trace:
 [<ffffffffa004201f>] fitpc2_wdt_init+0x1f/0x13c [sbc_fitpc2_wdt]
 [<ffffffff810002da>] do_one_initcall+0x3a/0x170
...
Code: f3 c3 0f 1f 00 80 3e 00 53 48 89 f8 74 1b 48 89 f2 0f 1f 40 00 48 83 c2 01 80 3a 00 75 f7 49 89 d0 48 89 f8 49 29 f0 75 02 5b c3 <80> 3f 00 74 0e 0f 1f 44 00 00 48 83 c0 01 80 38 00 75 f7 49 89

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2011-03-09 21:33:37 +00:00
..
acquirewdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
advantechwdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
adx_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
alim1535_wdt.c watchdog: alim1535_wdt: fix compiler warning on ali_pci_tbl 2011-01-12 10:23:55 +00:00
alim7101_wdt.c watchdog: alim7101_wdt: fix compiler warning on alim7101_pci_tbl 2011-01-12 10:24:11 +00:00
ar7_wdt.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
at32ap700x_wdt.c watchdog: at32ap700x_wdt: register misc device last in probe() function 2010-06-17 09:56:57 +00:00
at91rm9200_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
at91sam9_wdt.c [WATCHDOG] Correct WDIOF_MAGICCLOSE flag 2009-06-18 07:30:57 +00:00
ath79_wdt.c watchdog: add driver for the Atheros AR71XX/AR724X/AR913X SoCs 2011-01-12 13:51:29 +00:00
bcm47xx_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
bcm63xx_wdt.c watchdog: bcm63xx_wdt: improve platform part. 2010-12-02 14:10:16 +00:00
bfin_wdt.c watchdog: bfin: use new common Blackfin watchdog header 2010-05-25 09:03:07 +00:00
booke_wdt.c watchdog: Propagate Book E WDT period changes to all cores 2011-01-12 10:24:38 +00:00
coh901327_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
cpu5wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
cpwd.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
davinci_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ep93xx_wdt.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
eurotechwdt.c watchdog: update/improve/consolidate watchdog driver 2010-05-25 09:05:34 +00:00
f71808e_wdt.c watchdog: f71808e_wdt: Add Fintek F71869 watchdog 2011-01-12 10:23:04 +00:00
gef_wdt.c watchdog: gef_wdt: include fs.h 2010-12-02 14:10:21 +00:00
geodewdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
hpwdt.c x86: Convert some devices to use DIE_NMIUNKNOWN 2011-01-07 15:08:52 +01:00
i6300esb.c [WATCHDOG] i6300esb.c: change platform_driver to pci_driver 2010-03-08 13:48:01 +00:00
ib700wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ibmasr.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
imx2_wdt.c watchdog: imx: use clk_get to acquire the watchdog clock 2010-12-14 09:54:19 +01:00
indydog.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
iop_wdt.c [WATCHDOG] sizeof cleanup 2009-09-18 08:39:37 +00:00
it87_wdt.c watchdog: it87_wdt: Add support for watchdogs with 8b timers 2010-10-28 21:41:08 +00:00
it8712f_wdt.c watchdog: it8712f_wdt: Add module parameter for alternative reset sources 2010-10-28 21:42:32 +00:00
iTCO_vendor_support.c iTCO_wdt: fix TCO V1 timeout values and limits 2010-05-25 09:05:56 +00:00
iTCO_vendor.h
iTCO_wdt.c watchdog: iTCO_wdt: TCO Watchdog patch for Intel DH89xxCC PCH 2011-01-12 10:25:16 +00:00
ixp4xx_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ixp2000_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
Kconfig m68knommu: Rename m548x_wdt.c to m54xx_wdt.c 2011-02-08 15:07:45 +10:00
ks8695_wdt.c watchdog: ks8695_wdt: include mach/hardware.h instead of mach/timex.h. 2011-01-12 10:24:52 +00:00
m54xx_wdt.c m68knommu: Rename m548x_wdt.c to m54xx_wdt.c 2011-02-08 15:07:45 +10:00
machzwd.c watchdog: MachZ: fix debug macro 2010-10-28 21:42:59 +00:00
Makefile m68knommu: Rename m548x_wdt.c to m54xx_wdt.c 2011-02-08 15:07:45 +10:00
max63xx_wdt.c [WATCHDOG] max63xx: be careful when disabling the watchdog 2010-04-16 12:26:27 +00:00
mixcomwd.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
mpc8xxx_wdt.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
mpcore_wdt.c ARM: 6126/1: ARM mpcore_wdt: fix build failure and other fixes 2010-05-12 11:18:14 +01:00
mtx-1_wdt.c [WATCHDOG] move platform probe and remove function to devinit and devexit 2009-06-18 07:30:44 +00:00
mv64x60_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
nuc900_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nv_tco.c watchdog: Add TCO support for nVidia chipsets 2011-01-12 13:51:23 +00:00
nv_tco.h watchdog: Add TCO support for nVidia chipsets 2011-01-12 13:51:23 +00:00
octeon-wdt-main.c WATCHDOG: octeon-wdt: Use I/O clock rate for timing calculations. 2010-10-29 19:08:42 +01:00
octeon-wdt-nmi.S WATCHDOG: Add watchdog driver for OCTEON SOCs 2010-08-05 13:26:22 +01:00
omap_wdt.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
omap_wdt.h
orion_wdt.c
pc87413_wdt.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
pcwd_pci.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
pcwd_usb.c USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
pcwd.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
pika_wdt.c [WATCHDOG] powerpc: pika_wdt ident cannot be const 2010-04-03 22:22:20 +00:00
pnx833x_wdt.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
pnx4008_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rc32434_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
rdc321x_wdt.c watchdog: Fix null pointer dereference while accessing rdc321x platform_data 2010-12-22 12:05:21 +01:00
riowd.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
s3c2410_wdt.c watchdog: s3c2410_wdt - Fix removing of platform device 2010-08-08 18:20:09 +00:00
sa1100_wdt.c [WATCHDOG] SA1100 watchdog maximum timeout 2009-07-09 18:29:38 +00:00
sb_wdog.c watchdog: sb_wdog: release irq and reboot notifier in error path and module_exit() 2010-09-15 18:43:47 +00:00
sbc60xxwdt.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
sbc7240_wdt.c
sbc8360.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
sbc_epx_c3.c [WATCHDOG] Correct WDIOF_MAGICCLOSE flag 2009-06-18 07:30:57 +00:00
sbc_fitpc2_wdt.c watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME 2011-03-09 21:33:37 +00:00
sc520_wdt.c
sc1200wdt.c [WATCHDOG] sizeof cleanup 2009-09-18 08:39:37 +00:00
sch311x_wdt.c watchdog: sch311x_wdt.c: set parent before registeriing the misc device in probe() function 2010-08-08 18:21:15 +00:00
scx200_wdt.c [WATCHDOG] Correct WDIOF_MAGICCLOSE flag 2009-06-18 07:30:57 +00:00
shwdt.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
smsc37b787_wdt.c
softdog.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
sp805_wdt.c watchdog: Adding support for ARM Primecell SP805 Watchdog 2010-08-08 18:22:25 +00:00
sp5100_tco.c watchdog: Add support for sp5100 chipset TCO 2011-01-12 13:51:16 +00:00
sp5100_tco.h watchdog: Add support for sp5100 chipset TCO 2011-01-12 13:51:16 +00:00
stmp3xxx_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ts72xx_wdt.c watchdog: ts72xx_wdt: disable watchdog at probe 2010-09-15 18:43:52 +00:00
twl4030_wdt.c watchdog: twl4030_wdt: Disable watchdog during probing 2010-05-25 09:05:46 +00:00
txx9wdt.c [WATCHDOG] change reboot_notifier to platform-shutdown method. 2010-03-07 10:30:59 +00:00
w83627hf_wdt.c watchdog: Fix reboot on W83627ehf chipset. 2011-01-12 10:23:52 +00:00
w83697hf_wdt.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
w83697ug_wdt.c [WATCHDOG] w83697ug, fix lock imbalance 2009-07-09 18:29:16 +00:00
w83877f_wdt.c
w83977f_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
wafer5823wdt.c
wd501p.h
wdrtas.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
wdt285.c
wdt977.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
wdt_pci.c watchdog: wdt_pci.c: move ids to pci_ids.h 2010-08-08 18:20:38 +00:00
wdt.c watchdog: update/improve/consolidate watchdog driver 2010-05-25 09:05:34 +00:00
wm831x_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
wm8350_wdt.c [PATCH 2/11] drivers/watchdog: Eliminate a NULL pointer dereference 2010-06-07 15:55:03 +00:00