Bläddra i källkod

qcacld-3.0: Apps crash due to invalid wiphy check during unload

Wiphy is not getting unregister at the time of unload because of
that kernel has stale pointer which is causing a crash.

Add a proper check for wiphy during unload and unregister the wiphy.

Change-Id: Ibbdc3966f37bc628552c0118297f82065fa04d46
CRs-Fixed: 2027470
Ashish Kumar Dhanotiya 8 år sedan
förälder
incheckning
e16feb7622
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -5417,7 +5417,7 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
 	 * If there is re_init failure wiphy would have already de-registered
 	 * check the wiphy status before un-registering again
 	 */
-	if (!wiphy && wiphy->registered) {
+	if (wiphy && wiphy->registered) {
 		wiphy_unregister(wiphy);
 		wlan_hdd_cfg80211_deinit(wiphy);
 		hdd_lpass_notify_stop(hdd_ctx);