linux-uconsole/drivers/net/wireless/wl12xx
Grazvydas Ignotas 70aba33f52 wl1251: fix potential crash
commit 3f60ebc9d6 upstream.

In case debugfs does not init for some reason (or is disabled
on older kernels) driver does not allocate stats.fw_stats
structure, but tries to clear it later and trips on a NULL
pointer:

Unable to handle kernel NULL pointer dereference at virtual address
00000000
PC is at __memzero+0x24/0x80
Backtrace:
[<bf0ddb88>] (wl1251_debugfs_reset+0x0/0x30 [wl1251])
[<bf0d6a2c>] (wl1251_op_stop+0x0/0x12c [wl1251])
[<bf0bc228>] (ieee80211_stop_device+0x0/0x74 [mac80211])
[<bf0b0d10>] (ieee80211_stop+0x0/0x4ac [mac80211])
[<c02deeac>] (dev_close+0x0/0xb4)
[<c02deac0>] (dev_change_flags+0x0/0x184)
[<c031f478>] (devinet_ioctl+0x0/0x704)
[<c0320720>] (inet_ioctl+0x0/0x100)

Add a NULL pointer check to fix this.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-01 15:58:37 -07:00
..
Kconfig wl12xx: fix kconfig/link errors 2009-09-23 11:35:53 -04:00
Makefile wl1251: remove wl1251_ops 2009-08-14 09:13:38 -04:00
wl12xx_80211.h
wl1251.h wl1251: initialise default channel to zero 2009-08-14 09:13:40 -04:00
wl1251_acx.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_acx.h wl1251: remove wl1251_ops 2009-08-14 09:13:38 -04:00
wl1251_boot.c wl1251: halt the embedded CPU before loading firmware 2009-08-20 11:36:02 -04:00
wl1251_boot.h wl1251: remove wl1251_ops 2009-08-14 09:13:38 -04:00
wl1251_cmd.c wl1251: hack to disable filters for fixing association 2009-08-14 09:13:42 -04:00
wl1251_cmd.h wl1251: add channel to wl1251_cmd_join() parameters 2009-08-14 09:13:40 -04:00
wl1251_debugfs.c wl1251: fix potential crash 2010-04-01 15:58:37 -07:00
wl1251_debugfs.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1251_event.c wl1251: add hw scan completed debug message 2009-08-14 09:13:42 -04:00
wl1251_event.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1251_init.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_init.h wl1251: remove wl1251_ops 2009-08-14 09:13:38 -04:00
wl1251_io.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_io.h wl1251: make wl1251_set_partition bus agnostic 2009-08-14 09:13:37 -04:00
wl1251_main.c spi: prefix modalias with "spi:" 2009-09-23 07:39:43 -07:00
wl1251_netlink.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1251_ps.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_ps.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1251_reg.h wl1251: correct definitions for 0th bit defines 2009-08-20 11:35:58 -04:00
wl1251_rx.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_rx.h wl12xx: fix spelling 2009-07-24 15:05:26 -04:00
wl1251_sdio.c wl1251: remove Luciano as maintainer 2009-08-14 09:13:42 -04:00
wl1251_spi.c wl1251: remove Luciano as maintainer 2009-08-14 09:13:42 -04:00
wl1251_spi.h wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_tx.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_tx.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1271.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_acx.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_acx.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_boot.c wl1271: fix compiler warnings on 64 bit archs 2009-08-14 09:14:02 -04:00
wl1271_boot.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_cmd.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_cmd.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_debugfs.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_debugfs.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_event.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_event.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_init.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_init.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_main.c wl12xx: Fix print_mac() conversion. 2009-09-17 10:18:30 -07:00
wl1271_ps.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_ps.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_reg.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_rx.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_rx.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_spi.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_spi.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_tx.c wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_tx.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00