From b5145a4ef609a462a48e05640d0998271f48edf6 Mon Sep 17 00:00:00 2001 From: Sunmeet Gill Date: Wed, 25 Oct 2017 10:50:38 -0700 Subject: IPACM: fix the ipacm crash issue on SSR On SSR scenario without tethering enable once, ipacm crash due to uninitialized pointer, elrInstance. Make the change to initialize it as NULL Test: Verified force modem SSR and ipacm didn't crash Verified basic data and tethering use cases Bug: 67019241 CRs-Fixed: 2132095 Change-Id: I126f44c02a8b186dd2e61392cb2d9732263165e1 --- msm8998/ipacm/src/IPACM_Main.cpp | 3 +++ msm8998/ipacm/src/IPACM_OffloadManager.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/msm8998/ipacm/src/IPACM_Main.cpp b/msm8998/ipacm/src/IPACM_Main.cpp index 13cdb51..62dc596 100644 --- a/msm8998/ipacm/src/IPACM_Main.cpp +++ b/msm8998/ipacm/src/IPACM_Main.cpp @@ -694,6 +694,7 @@ void* ipa_driver_msg_notifier(void *param) if (OffloadMng->elrInstance == NULL) { IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n"); } else { + IPACMERR("calling OffloadMng->elrInstance->onLimitReached \n"); OffloadMng->elrInstance->onLimitReached(); } continue; @@ -703,6 +704,7 @@ void* ipa_driver_msg_notifier(void *param) if (OffloadMng->elrInstance == NULL) { IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n"); } else { + IPACMERR("calling OffloadMng->elrInstance->onOffloadStopped \n"); OffloadMng->elrInstance->onOffloadStopped(IpaEventRelay::ERROR); } continue; @@ -712,6 +714,7 @@ void* ipa_driver_msg_notifier(void *param) if (OffloadMng->elrInstance == NULL) { IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n"); } else { + IPACMERR("calling OffloadMng->elrInstance->onOffloadSupportAvailable \n"); OffloadMng->elrInstance->onOffloadSupportAvailable(); } continue; diff --git a/msm8998/ipacm/src/IPACM_OffloadManager.cpp b/msm8998/ipacm/src/IPACM_OffloadManager.cpp index 2061fd2..4010e72 100644 --- a/msm8998/ipacm/src/IPACM_OffloadManager.cpp +++ b/msm8998/ipacm/src/IPACM_OffloadManager.cpp @@ -59,6 +59,8 @@ IPACM_OffloadManager::IPACM_OffloadManager() upstream_v6_up = false; memset(event_cache, 0, MAX_EVENT_CACHE*sizeof(framework_event_cache)); latest_cache_index = 0; + elrInstance = NULL; + touInstance = NULL; return ; } -- cgit v1.2.3