Re: [PATCH 01/10] ASoC: qcom: q6apm: fix array out of bounds on lpass ports

From: Srinivas Kandagatla

Date: Fri Feb 06 2026 - 04:53:45 EST


On 2/5/26 12:46 PM, Mark Brown wrote:
> On Thu, Feb 05, 2026 at 12:14:02PM -0500, Srinivas Kandagatla wrote:
>> lpass ports numbers have been added but the apm driver never got updated
>> with new max port value that it uses to store dai specific data.
>>
>> This will result in array out of bounds and weird driver behaviour.
>> Fix this by adding a new LPASS_MAX_PORT which is can be used by driver
>> instead of using number and any new port additional can only be done in
>> one place, which should avoid these type of mistakes in future.
>
> It would probably be good to improve the valdiation in the driver when
> it starts using port numbers.
Good idea, will try that out in next spin.
--srini