qcacld-3.0: Validate adapter before sched scan stop
wlan_hdd_cfg80211_sched_scan_stop() currently does not validate the given adapter or the hdd context. Validate both before performing a scheduled scan stop operation on said adapter. Change-Id: I4e0370ad059fbb0371a38300f33dfae7a9f8106d CRs-Fixed: 2289411
This commit is contained in:
@@ -1351,7 +1351,8 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev)
|
|||||||
*/
|
*/
|
||||||
static int __wlan_hdd_cfg80211_sched_scan_stop(struct net_device *dev)
|
static int __wlan_hdd_cfg80211_sched_scan_stop(struct net_device *dev)
|
||||||
{
|
{
|
||||||
int err;
|
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||||
|
int errno;
|
||||||
|
|
||||||
hdd_enter_dev(dev);
|
hdd_enter_dev(dev);
|
||||||
|
|
||||||
@@ -1377,10 +1378,19 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct net_device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = wlan_hdd_sched_scan_stop(dev);
|
errno = hdd_validate_adapter(adapter);
|
||||||
|
if (errno)
|
||||||
|
return errno;
|
||||||
|
|
||||||
|
errno = wlan_hdd_validate_context(WLAN_HDD_GET_CTX(adapter));
|
||||||
|
if (errno)
|
||||||
|
return errno;
|
||||||
|
|
||||||
|
errno = wlan_hdd_sched_scan_stop(dev);
|
||||||
|
|
||||||
hdd_exit();
|
hdd_exit();
|
||||||
return err;
|
|
||||||
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||||
|
Viittaa uudesa ongelmassa
Block a user