summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYun Park <yunp@codeaurora.org>2017-02-01 12:15:03 -0800
committerqcabuildsw <qcabuildsw@localhost>2017-02-01 18:07:12 -0800
commit51dce04f00d78a8f268f9a31a3a9fbed484b791e (patch)
tree746d4570e0cfc4acb9f5e83bb8333a30562ad74e
parentd30817f523f1edc8075658d5e28124e07e9c3fcd (diff)
qcacld-3.0: Check adapter is not NULL when receiving IPA_RECEIVE event
Check adapter is not NULL when receiving IPA_RECEIVE event, to avoid null dereference when the interface is already cleaned up. Change-Id: Ic9240811f42edd4f495cb4eabe1268d24851d6d9 CRs-Fixed: 2001132
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 8f87a4d9343a..8d8a134c1bc4 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -3927,6 +3927,13 @@ static void __hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
iface_context = &hdd_ipa->iface_context[iface_id];
adapter = iface_context->adapter;
+ if (!adapter) {
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
+ "IPA_RECEIVE: Adapter is NULL");
+ HDD_IPA_INCREASE_INTERNAL_DROP_COUNT(hdd_ipa);
+ kfree_skb(skb);
+ return;
+ }
HDD_IPA_DBG_DUMP(QDF_TRACE_LEVEL_DEBUG,
"w2i -- skb",