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-12-01 21:04:43 -02:00
2010-10-27 12:29:51 -07:00
2010-09-23 14:33:39 -07:00
2010-03-30 22:02:32 +09:00
2010-10-23 11:47:02 -07:00
2010-10-17 13:49:14 -07:00
2010-10-13 14:40:34 -07:00
2010-09-23 14:33:39 -07:00
2010-08-20 01:42:59 -07:00
2010-10-16 11:13:24 -07:00
2010-06-11 18:37:08 -07:00
2010-10-05 00:47:39 -07:00
2009-08-12 21:54:50 -07:00
2010-06-16 14:58:16 -07:00
2009-11-04 05:06:25 -08:00
2010-09-29 19:45:35 -07:00
2010-03-30 22:02:32 +09:00
2009-03-24 23:32:03 -07:00
2010-12-16 15:22:31 -05:00
2009-03-28 15:01:36 +11:00
2010-10-07 09:43:45 +02:00
2009-12-11 15:07:56 -08:00
2009-09-01 01:24:30 -07:00
2010-06-03 03:21:52 -07:00
2010-03-27 19:23:46 -07:00
2010-06-03 03:21:52 -07:00
2010-06-10 23:31:35 -07:00
2009-03-21 19:06:54 -07:00
2010-11-15 15:00:42 -05:00
2010-10-27 11:37:31 -07:00
2009-03-27 00:16:21 -07:00
2010-10-27 11:37:32 -07:00
2010-09-28 23:38:15 -07:00
2010-10-25 13:09:44 -07:00
2009-11-04 05:06:25 -08:00
2010-10-05 13:35:30 -04:00
2010-08-21 23:05:39 -07:00
2010-04-13 14:49:31 -07:00
2010-02-08 16:50:53 -05:00
2009-11-06 14:32:18 +03:00
2009-07-23 17:08:51 +04:00
2010-05-18 15:36:06 -07:00
2010-04-15 23:36:37 -07:00
2009-12-08 20:17:51 -08:00
2010-07-12 20:21:46 -07:00
2010-08-30 13:23:33 -07:00
2010-09-23 14:33:39 -07:00
2010-06-30 13:44:29 -07:00
2010-10-21 13:06:43 +02:00
2010-06-23 13:16:38 -07:00
2010-04-27 12:39:01 -07:00
2010-10-27 11:37:33 -07:00
2010-06-10 23:31:35 -07:00
2010-04-13 01:41:33 -07:00
2010-10-25 13:09:45 -07:00
2010-10-28 10:27:03 -07:00
2010-10-21 11:04:43 +02:00
2010-10-25 14:18:28 -07:00
2010-02-16 23:05:38 -08:00
2010-10-27 11:37:32 -07:00
2010-09-23 14:33:39 -07:00
2010-06-03 03:21:52 -07:00
2010-03-31 14:49:12 -04:00
2010-07-26 15:09:04 -04:00
2009-12-26 20:43:57 -08:00
2009-12-26 20:46:28 -08:00
2010-12-15 17:03:59 -05:00
2010-06-03 03:21:52 -07:00
2010-04-23 13:35:55 +09:00
2010-06-03 03:21:52 -07:00
2010-10-11 16:09:14 -07:00
2010-10-25 14:18:27 -07:00
2010-03-30 22:02:32 +09:00
2010-06-23 12:58:40 -07:00
2010-03-30 22:02:32 +09:00
2009-08-19 23:08:22 +04:00
2009-11-20 15:35:04 -08:00
2010-06-02 03:23:51 -07:00
2010-10-27 11:37:31 -07:00
2009-03-21 19:06:50 -07:00
2010-09-08 13:42:22 -07:00
2009-06-23 04:31:07 -07:00
2009-11-04 05:06:25 -08:00
2010-11-22 15:48:51 -05:00
2010-01-17 19:09:39 -08:00
2009-07-26 19:11:14 -07:00
2010-09-27 15:03:33 -07:00
2010-10-21 03:09:45 -07:00
2010-10-21 03:09:47 -07:00
2010-06-16 14:55:56 -07:00
2010-06-30 13:31:19 -07:00
2010-10-25 14:18:28 -07:00
2010-09-29 19:45:36 -07:00
2010-04-23 23:35:28 -07:00
2010-10-21 16:05:41 +02:00
2009-10-07 16:39:43 -04:00
2009-12-09 19:43:33 -08:00
2009-11-06 14:32:24 +03:00
2010-05-17 17:39:27 -07:00
2010-04-22 16:12:36 -07:00
2010-10-27 11:37:32 -07:00