Merge tag 'LA.UM.9.15.2.r1-10600-KAMORTA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-4.19-kona
"LA.UM.9.15.2.r1-10600-KAMORTA.QSSI14.0" * tag 'LA.UM.9.15.2.r1-10600-KAMORTA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel: dsp: q6lsm: Check size of payload before access asoc: codecs: Fix for the SSR issue on qcm2150 dsp: q6voice: Adds checks for an integer overflow asoc: Fix out-of-bound write dsp: q6voice: Adds checks for an integer overflow Fix for OOB access issue dsp: q6lsm: Check size of payload before access Change-Id: I708a0be36841731d8c5126b8135123b642a8a7d7
This commit is contained in:
2 files changed
+20
-4
No files matched your search
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2017, 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@@ -1141,8 +1142,10 @@ static int msm_dig_cdc_event_notify(struct notifier_block *block,
|
||||
break;
|
||||
case DIG_CDC_EVENT_SSR_UP:
|
||||
regcache_cache_only(msm_dig_cdc->regmap, false);
|
||||
regcache_mark_dirty(msm_dig_cdc->regmap);
|
||||
|
||||
if ((msm_dig_cdc->regmap) != NULL && (msm_dig_cdc->regmap->lock) != NULL &&
|
||||
(msm_dig_cdc->regmap->lock_arg) != NULL) {
|
||||
regcache_mark_dirty(msm_dig_cdc->regmap);
|
||||
}
|
||||
mutex_lock(&pdata->cdc_int_mclk0_mutex);
|
||||
pdata->digital_cdc_core_clk.enable = 1;
|
||||
ret = afe_set_lpass_clock_v2(
|
||||
@@ -1156,7 +1159,10 @@ static int msm_dig_cdc_event_notify(struct notifier_block *block,
|
||||
}
|
||||
mutex_unlock(&pdata->cdc_int_mclk0_mutex);
|
||||
|
||||
regcache_sync(msm_dig_cdc->regmap);
|
||||
if ((msm_dig_cdc->regmap) != NULL && (msm_dig_cdc->regmap->lock) != NULL &&
|
||||
(msm_dig_cdc->regmap->lock_arg) != NULL) {
|
||||
regcache_sync(msm_dig_cdc->regmap);
|
||||
}
|
||||
|
||||
mutex_lock(&pdata->cdc_int_mclk0_mutex);
|
||||
pdata->digital_cdc_core_clk.enable = 0;
|
||||
|
||||
@@ -2035,8 +2035,18 @@ static int q6lsm_mmapcallback(struct apr_client_data *data, void *priv)
|
||||
lsm_common.set_custom_topology = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
The payload_size can be either 4 or 8 bytes.
|
||||
It has to be verified whether the payload_size is
|
||||
atleast 4 bytes. If it is less, returns errorcode.
|
||||
|
||||
if (data->payload_size < (2 * sizeof(uint32_t))) {
|
||||
The opcode for 4 bytes is 0x12A80
|
||||
The opcode for 8 bytes is 0x110E8.
|
||||
|
||||
*/
|
||||
|
||||
if (data->payload_size < (2 * sizeof(uint16_t))) {
|
||||
pr_err("%s: payload has invalid size[%d]\n", __func__,
|
||||
data->payload_size);
|
||||
return -EINVAL;
|
||||
|
||||
Reference in new issue
Block a user