Skip to content
Snippets Groups Projects
Commit 5697436b authored by Mohammed Javid's avatar Mohammed Javid Committed by abel_fang
Browse files

msm: ipa: Fix to use after free issue


Added to code changes to ref_cnt variable will decrement only
when add_ref_hdr variable is true.

Change-Id: I0bcc3909669f4843c43135e5f047ac28fa62bb63
Acked-by: default avatarAshok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent f52011ee
No related branches found
No related tags found
No related merge requests found
...@@ -581,6 +581,7 @@ ipa_insert_failed: ...@@ -581,6 +581,7 @@ ipa_insert_failed:
htbl->proc_ctx_cnt--; htbl->proc_ctx_cnt--;
bad_len: bad_len:
if (add_ref_hdr)
hdr_entry->ref_cnt--; hdr_entry->ref_cnt--;
entry->cookie = 0; entry->cookie = 0;
kmem_cache_free(ipa_ctx->hdr_proc_ctx_cache, entry); kmem_cache_free(ipa_ctx->hdr_proc_ctx_cache, entry);
......
...@@ -462,6 +462,7 @@ ipa_insert_failed: ...@@ -462,6 +462,7 @@ ipa_insert_failed:
htbl->proc_ctx_cnt--; htbl->proc_ctx_cnt--;
bad_len: bad_len:
if (add_ref_hdr)
hdr_entry->ref_cnt--; hdr_entry->ref_cnt--;
entry->cookie = 0; entry->cookie = 0;
kmem_cache_free(ipa3_ctx->hdr_proc_ctx_cache, entry); kmem_cache_free(ipa3_ctx->hdr_proc_ctx_cache, entry);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment