linux/drivers/net/wireless/wl12xx
Grazvydas Ignotas 3f60ebc9d6 wl1251: fix potential crash
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>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-16 15:20:25 -04:00
..
Kconfig
Makefile wl1271: Moved common IO functions from wl271_spi.c to wl1271_io.c 2010-02-19 15:52:47 -05:00
wl12xx_80211.h
wl1251.h mac80211: wait for beacon before enabling powersave 2010-01-26 11:53:21 -05:00
wl1251_acx.c wl1251: implement wl1251_acx_tid_cfg() 2009-12-21 18:55:57 -05:00
wl1251_acx.h wl1251: implement wl1251_acx_tid_cfg() 2009-12-21 18:55:57 -05:00
wl1251_boot.c wl1251: timeout one too soon in wl1251_boot_run_firmware() 2009-12-28 16:20:06 -05:00
wl1251_boot.h
wl1251_cmd.c wl1251: use mac80211 provided channel parameters in scanning 2010-01-12 13:51:26 -05:00
wl1251_cmd.h wl1251: use mac80211 provided channel parameters in scanning 2010-01-12 13:51:26 -05:00
wl1251_debugfs.c wl1251: fix potential crash 2010-03-16 15:20:25 -04:00
wl1251_debugfs.h
wl1251_event.c wl1251: Increase the beacon loss timeout value and handle regain event 2009-11-18 17:09:22 -05:00
wl1251_event.h
wl1251_init.c wl1251: implement acx_ac_cfg to configure hardware queues 2009-12-21 18:55:55 -05:00
wl1251_init.h wl1251: implement acx_ac_cfg to configure hardware queues 2009-12-21 18:55:55 -05:00
wl1251_io.c
wl1251_io.h
wl1251_main.c wl1251: fix txop unit 2010-02-08 16:50:56 -05:00
wl1251_ps.c wl1251: simplify ELP wakeup time calculation 2009-12-21 18:55:52 -05:00
wl1251_ps.h wl1251: Implement delayed entry into ELP mode 2009-11-18 17:09:20 -05:00
wl1251_reg.h wl1251: add NVS in EEPROM support 2009-11-18 17:09:24 -05:00
wl1251_rx.c wl1251: use __dev_alloc_skb() on RX 2009-12-21 18:55:54 -05:00
wl1251_rx.h
wl1251_sdio.c
wl1251_spi.c wl1251: add NVS in EEPROM support 2009-11-18 17:09:24 -05:00
wl1251_spi.h
wl1251_tx.c wl1251: update tx_hdr when aliging skb in tx 2009-12-21 18:56:00 -05:00
wl1251_tx.h wl1251: enable WMM 2009-12-21 18:56:02 -05:00
wl1271.h wl1271: add testmode support 2010-02-19 15:52:47 -05:00
wl1271_acx.c wl1271: modify wl1271_acx_tid_cfg() to use function parameters 2010-02-19 15:52:43 -05:00
wl1271_acx.h wl1271: Fix beacon filter table configuration 2010-02-19 15:52:46 -05:00
wl1271_boot.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_boot.h
wl1271_cmd.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_cmd.h wl1271: Use NVS INI file configuration 2010-02-19 15:52:43 -05:00
wl1271_conf.h wl1271: Use NVS INI file configuration 2010-02-19 15:52:43 -05:00
wl1271_debugfs.c wl1271: Change booleans in struct wl1271 into a flags bitmask 2009-12-28 16:31:35 -05:00
wl1271_debugfs.h
wl1271_event.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_event.h wl1271: Fix event acknowledging functionality 2009-12-28 16:31:34 -05:00
wl1271_init.c wl1271: add most of the normal initialization commands to PLT mode 2010-02-19 15:52:44 -05:00
wl1271_init.h wl1271: add most of the normal initialization commands to PLT mode 2010-02-19 15:52:44 -05:00
wl1271_io.c wl1271: Added IO reset and init functions 2010-02-19 15:52:47 -05:00
wl1271_io.h wl1271: Added IO reset and init functions 2010-02-19 15:52:47 -05:00
wl1271_main.c wl1271: Added alloc and free hw functions 2010-02-19 15:52:48 -05:00
wl1271_ps.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_ps.h wl1271: Fix PSM entry 2010-02-19 15:52:42 -05:00
wl1271_reg.h wl1271: remove unused flags 2010-01-14 18:16:54 -05:00
wl1271_rx.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_rx.h
wl1271_spi.c wl1271: Moved common IO functions from wl271_spi.c to wl1271_io.c 2010-02-19 15:52:47 -05:00
wl1271_spi.h wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_testmode.c wl1271: add testmode support 2010-02-19 15:52:47 -05:00
wl1271_testmode.h wl1271: add testmode support 2010-02-19 15:52:47 -05:00
wl1271_tx.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_tx.h wl1271: implement WMM 2010-02-19 15:52:43 -05:00