From 42686162533b131ead66ea069a7ae165d63c1bc2 Mon Sep 17 00:00:00 2001
From: Paul Fertser <fercerpav@gmail.com>
Date: Sat, 6 Mar 2010 15:44:10 +0300
Subject: [PATCH 1/2] ar6000: minimise possibility of race in ar6000_ioctl_siwscan
This stupid patch should make driver not do NULL pointer dereference when
there's a race between scan and removing of the device. As clumsy as the
rest of the driver, this is not a proper solution, of course.
Screw the anonymous dev who's written the original code!
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
---
drivers/ar6000/ar6000/wireless_ext.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/ar6000/ar6000/wireless_ext.c b/drivers/ar6000/ar6000/wireless_ext.c
index af78ae0..52a4675 100644
|
a
|
b
|
ar6000_ioctl_siwscan(struct net_device *dev, |
| 1813 | 1813 | wait_event_interruptible_timeout(ar6000_scan_queue, ar->scan_complete, |
| 1814 | 1814 | 5 * HZ); |
| 1815 | 1815 | |
| | 1816 | if (ar->arWmiReady == FALSE || ar->arWlanState == WLAN_DISABLED) |
| | 1817 | return -EIO; |
| | 1818 | |
| 1816 | 1819 | if (wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0) != A_OK) { |
| 1817 | 1820 | printk("Couldn't set filtering\n"); |
| 1818 | 1821 | ret = -EIO; |