summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2017-06-16 17:14:39 -0600
committerPankaj Kanwar <pkanwar@google.com>2017-06-19 04:05:25 +0000
commit7a37b64f750eb73cc1ff78919e60008ba7ee3169 (patch)
treead1f10322cbbd90e3d39dd6ef7267ff98e4c056c
parent70f4496c7a1104a4e84ceb7108f678bf1ca7f7f6 (diff)
downloadipacfg-mgr-7a37b64f750eb73cc1ff78919e60008ba7ee3169.tar.gz
ipacm: fix the heap-use-after-free issue on bootup
On device bootup, ASAN was reported IPACM has the heap-use-after-free issue on IPACM_Netlink.cpp file when bootup. The fix is to move the debug prints before the events are getting posted and processed. CRs-Fixed: 2015603 bug: 62601156 Test: manual Change-Id: Id0a1b4e85d2d3fb027729ff6e98e25d26a9e638a
-rw-r--r--msm8998/ipacm/src/IPACM_Netlink.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/msm8998/ipacm/src/IPACM_Netlink.cpp b/msm8998/ipacm/src/IPACM_Netlink.cpp
index 30295b1..a971b8e 100644
--- a/msm8998/ipacm/src/IPACM_Netlink.cpp
+++ b/msm8998/ipacm/src/IPACM_Netlink.cpp
@@ -717,9 +717,9 @@ static int ipa_nl_decode_nlmsg
---------------------------------------------------------------------------*/
evt_data.event = IPA_USB_LINK_UP_EVENT;
evt_data.evt_data = data_fid;
- IPACM_EvtDispatcher::PostEvt(&evt_data);
IPACMDBG_H("Posting usb IPA_LINK_UP_EVENT with if index: %d\n",
data_fid->if_index);
+ IPACM_EvtDispatcher::PostEvt(&evt_data);
}
else if(!(msg_ptr->nl_link_info.metainfo.ifi_flags & IFF_LOWER_UP))
{
@@ -744,9 +744,9 @@ static int ipa_nl_decode_nlmsg
---------------------------------------------------------------------------*/
evt_data.event = IPA_LINK_DOWN_EVENT;
evt_data.evt_data = data_fid;
- IPACM_EvtDispatcher::PostEvt(&evt_data);
IPACMDBG_H("Posting usb IPA_LINK_DOWN_EVENT with if index: %d\n",
data_fid->if_index);
+ IPACM_EvtDispatcher::PostEvt(&evt_data);
}
}
break;