Luis R. Rodriguez
2784fe915c
cfg80211: fix null pointer dereference with a custom regulatory request
...
Once we moved the core regulatory request to the queue and let
the scheduler process it last_request will have been left NULL
until the schedular decides to process the first request. When
this happens and we are loading a driver with a custom regulatory
request like all Atheros drivers we end up with a NULL pointer
dereference. We fix this by checking if the request was a
custom one.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
IP: [<ffffffffa016de87>] freq_reg_info_regd.clone.2+0x27/0x130 [cfg80211]
PGD 71f91067 PUD 712b2067 PMD 0
Oops: 0000 [#1 ] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/firmware/2-1/loading
CPU 0
Modules linked in: ath9k_htc(+) ath9k_common ath9k_hw ath <etc>
Pid: 3094, comm: insmod Tainted: G W 2.6.37-rc5-wl #16 INVALID/28427ZQ
RIP: 0010:[<ffffffffa016de87>] [<ffffffffa016de87>] freq_reg_info_regd.clone.2+0x27/0x130 [cfg80211]
RSP: 0018:ffff88007045db78 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffffffa047d9a0 RCX: ffff88007045dbd0
RDX: 0000000000004e20 RSI: 000000000024cde0 RDI: ffff8800700483e0
RBP: ffff88007045db98 R08: ffffffffa02f5b40 R09: 0000000000000001
R10: 000000000000000e R11: 0000000000000001 R12: 0000000000000000
R13: ffff88007004e3b0 R14: 0000000000000000 R15: ffff880070048340
FS: 00007f635a707700(0000) GS:ffff880077400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000004 CR3: 00000000708a9000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process insmod (pid: 3094, threadinfo ffff88007045c000, task ffff8800713e3ec0)
Stack:
ffffffffa047d9a0 0000000000000000 ffff88007004e3b0 0000000000000000
ffff88007045dc08 ffffffffa016e147 000000007045dc08 0000000000000002
ffff8800700483e0 ffffffffa02f5b40 ffff88007045dbd8 0000000000000000
Call Trace:
[<ffffffffa016e147>] wiphy_apply_custom_regulatory+0x137/0x1d0 [cfg80211]
[<ffffffffa047a690>] ? ath9k_reg_notifier+0x0/0x50 [ath9k_htc]
[<ffffffffa02f47f7>] ath_regd_init+0x347/0x430 [ath]
[<ffffffffa047b1f5>] ath9k_htc_probe_device+0x6c5/0x960 [ath9k_htc]
[<ffffffffa0472a2c>] ath9k_htc_hw_init+0xc/0x30 [ath9k_htc]
[<ffffffffa04747e6>] ath9k_hif_usb_probe+0x216/0x3b0 [ath9k_htc]
[<ffffffffa03bb6bc>] usb_probe_interface+0x10c/0x210 [usbcore]
[<ffffffff812aec26>] driver_probe_device+0x96/0x1c0
[<ffffffff812aedf3>] __driver_attach+0xa3/0xb0
[<ffffffff812aed50>] ? __driver_attach+0x0/0xb0
[<ffffffff812adaae>] bus_for_each_dev+0x5e/0x90
[<ffffffff812ae8c9>] driver_attach+0x19/0x20
[<ffffffff812ae438>] bus_add_driver+0x168/0x320
[<ffffffff812af071>] driver_register+0x71/0x140
[<ffffffff811fc4a8>] ? __raw_spin_lock_init+0x38/0x70
[<ffffffffa03ba39c>] usb_register_driver+0xdc/0x190 [usbcore]
[<ffffffffa03a2000>] ? ath9k_htc_init+0x0/0x4f [ath9k_htc]
[<ffffffffa047499e>] ath9k_hif_usb_init+0x1e/0x20 [ath9k_htc]
[<ffffffffa03a202b>] ath9k_htc_init+0x2b/0x4f [ath9k_htc]
[<ffffffff8100212f>] do_one_initcall+0x3f/0x180
[<ffffffff8109ef5b>] sys_init_module+0xbb/0x200
[<ffffffff8100bf52>] system_call_fastpath+0x16/0x1b
Code: <etc, who cares>
RIP [<ffffffffa016de87>] freq_reg_info_regd.clone.2+0x27/0x130 [cfg80211]
RSP <ffff88007045db78>
CR2: 0000000000000004
---[ end trace 79e4193601c8b713 ]---
Reported-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:31 -05:00
..
2010-10-28 09:08:49 -05:00
2010-10-25 13:09:44 -07:00
2010-10-25 13:09:43 -07:00
2010-04-11 14:53:53 -07:00
2010-10-23 11:47:02 -07:00
2010-10-24 13:41:39 -07:00
2010-12-15 16:33:28 -05:00
2010-10-21 04:25:48 -07:00
2010-10-06 19:39:31 -07:00
2010-10-21 04:27:03 -07:00
2010-10-20 15:38:23 -07:00
2010-10-28 11:47:53 -07:00
2010-03-30 22:02:32 +09:00
2010-10-28 10:27:01 -07:00
2010-10-11 13:06:53 -07:00
2010-08-11 17:11:28 +00:00
2010-08-11 23:03:50 -07:00
2010-09-23 14:33:39 -07:00
2010-09-23 14:33:39 -07:00
2010-05-23 23:11:07 -07:00
2010-10-30 16:21:28 -07:00
2010-10-30 16:17:23 -07:00
2010-10-21 15:44:13 +02:00
2010-10-24 13:41:39 -07:00
2010-10-25 16:10:19 +02:00
2010-09-23 14:33:39 -07:00
2010-10-24 22:26:41 -07:00
2010-03-30 22:02:32 +09:00
2010-09-16 22:38:23 -07:00
2010-12-16 15:22:30 -05:00
2010-10-28 12:59:53 -07:00
2010-05-17 23:23:14 -07:00
2010-10-24 16:25:39 -07:00
2010-04-20 16:37:13 -07:00
2010-08-19 00:08:30 -07:00
2010-10-20 01:55:54 -07:00
2010-10-30 16:34:18 -07:00
2010-11-15 13:24:06 -05:00
2010-09-27 01:03:03 -07:00
2010-08-12 09:51:35 -07:00
2010-10-23 11:47:02 -07:00
2010-10-23 11:47:02 -07:00
2010-10-29 04:16:28 -04:00
2010-10-21 08:43:05 -07:00
2010-10-26 16:52:15 -07:00
2010-08-09 11:25:17 +02:00
2010-05-20 21:04:44 -07:00
2010-12-16 15:22:31 -05:00
2010-10-23 11:47:02 -07:00
2010-10-21 03:09:46 -07:00
2010-10-28 11:47:52 -07:00
2010-10-20 15:37:28 -07:00
2010-10-20 15:37:28 -07:00
2010-10-15 15:53:27 +02:00
2010-10-30 18:42:58 -07:00
2010-05-17 23:23:14 -07:00