Prechádzať zdrojové kódy

qcacld-3.0: Check the netdev state when sending the scan done

When the SSR and interface down happen in parallel,
the driver rejects the interface down since the
recovery is in progress. Kernel ignores the -EAGAIN
request from the driver and as part of NET_DOWN notification
in cfg80211_netdown_notifer the kernel invokes the
___cfg80211_scan_done to free the scan request.

As part of the driver recovery, the driver also tries to
invoke the scan done on the scan request which is already freed
by kernel resulting in invalid access, so check the driver state
and send the scan done indication to kernel.

Change-Id: I7aa9286e32c407af88fe7be301b825506140d5a3
CRs-Fixed: 3345420
Arun Kumar Khandavalli 2 rokov pred
rodič
commit
dcabca8772
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      core/hdd/src/wlan_hdd_object_manager.c

+ 2 - 1
core/hdd/src/wlan_hdd_object_manager.c

@@ -137,7 +137,8 @@ static int hdd_check_internal_netdev_state(struct net_device *netdev)
 	if (!adapter)
 		return false;
 
-	if (test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags))
+	if (test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags) &&
+	    (netdev->flags & IFF_UP))
 		return true;
 	else
 		return false;