mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
msm: ipa: Fix KW P1 issue
KW tool detect the potential NULL access and buffer index overflow issue. The change is to add the proper handle for NULL response and prevent buffer index overflow. Change-Id: I0bb1b45ba6e5b0abe6c3539d451f74e19028737c Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
This commit is contained in:
parent
398c93fd7f
commit
2a54c015b8
2 changed files with 5 additions and 2 deletions
|
|
@ -384,6 +384,9 @@ static void ipa3_handle_mhi_vote_req(struct qmi_handle *qmi_handle,
|
|||
IPA_QMI_ERR_NOT_SUPPORTED_V01;
|
||||
}
|
||||
resp = &resp2;
|
||||
} else {
|
||||
IPAWANERR("clk_rate_valid is false\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
resp = imp_handle_vote_req(vote_req->mhi_vote);
|
||||
|
|
|
|||
|
|
@ -403,10 +403,10 @@ static ssize_t ipa_ut_dbgfs_meta_test_read(struct file *file,
|
|||
meta_type = (long)(file->private_data);
|
||||
IPA_UT_DBG("Meta test type %ld\n", meta_type);
|
||||
|
||||
buf = kmalloc(IPA_UT_DEBUG_READ_BUF_SIZE, GFP_KERNEL);
|
||||
buf = kmalloc(IPA_UT_DEBUG_READ_BUF_SIZE + 1, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
IPA_UT_ERR("failed to allocate %d bytes\n",
|
||||
IPA_UT_DEBUG_READ_BUF_SIZE);
|
||||
IPA_UT_DEBUG_READ_BUF_SIZE + 1);
|
||||
cnt = 0;
|
||||
goto unlock_mutex;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue