summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManjeet Singh <manjee@codeaurora.org>2016-10-27 14:18:51 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-11-09 01:10:48 -0800
commit076a3874f61358d8858ff4eb95968962914e6d81 (patch)
treeb12207a15e987e474e10fc3a7af4ebfb5c5dddde
parentcfada69484a39d6c145dcce155bf59709af45d57 (diff)
qcacld-3.0: Validate hif ctx during shutdown
In function wlan_hdd_shutdown, hif_ctx is not validated before use in hif_disable_isr. This can lead to a null pointer exception in certain situations. Validate hif_ctx before use in shutdown function. Change-Id: Id50d87378ee176f6a48a790ec7027994aef0adf8 CRs-Fixed: 1083020
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index afee223dcd4d..20290b8f9280 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -450,7 +450,10 @@ static void wlan_hdd_shutdown(void)
hdd_err("Host is not ready for SSR, attempting anyway");
if (!QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
- hif_disable_isr(hif_ctx);
+ if (!hif_ctx)
+ hdd_err("Invalid hif ctx!");
+ else
+ hif_disable_isr(hif_ctx);
hdd_wlan_shutdown();
}
}