From cfa4e0a33421a7b28a2e57ca1dedbbe50f45ebaf Mon Sep 17 00:00:00 2001 From: jitiphil Date: Tue, 3 Apr 2018 16:52:52 +0530 Subject: qcacld-3.0: Fix check condition after taking lock In IPA clean interface function a NULL check was added to prevent race condition between supplicant and MC thread after acquiring lock, which otherwise would have lead to a NULL access. The check condition was performing check for valid value instead of NULL. To address the issue the check condition was corrected to check for NULL. Change-Id: I1c7205ac78f31a0d31a2d07eccbe11b64578ab76 CRS-Fixed: 2217450 --- core/hdd/src/wlan_hdd_ipa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 1938d8b27bee..00022a92d97c 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -6254,7 +6254,7 @@ static void hdd_ipa_cleanup_iface(struct hdd_ipa_iface_context *iface_context) * and check if the address has been already cleared by the * other thread */ - if (iface_context->adapter) { + if (!iface_context->adapter) { qdf_spin_unlock_bh(&iface_context->interface_lock); HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "Already cleared"); goto end; -- cgit v1.2.3