Re: [PATCH] platform: arm64: qcom-hamoa-ec: reject incomplete responses
From: Anvesh Jain P
Date: Wed Jul 29 2026 - 07:14:35 EST
On 7/29/2026 3:53 PM, Bryan O'Donoghue wrote:
> On 29/07/2026 11:08, Anvesh Jain P wrote:
>>> - if (resp[0] >= resp_len)
>>> + if (resp[0] != resp_len - 1)
>>> return -EINVAL;
>>> return 0;
>> Thanks for catching this — nice find.
>>
>> This is independently fixed in an in-flight series that reworks
>> qcom_ec_read() to use raw i2c_transfer() instead of
>> i2c_smbus_read_i2c_block_data(), removing the partial-read case
>> entirely, and it already has the same resp[0] != resp_len - 1 check.
>> That series just hasn't landed yet, so your report stands on its own —
>> happy to add a Reported-by: Linmao Li<lilinmao@xxxxxxxxxx> tag on that
>> commit when it's re-posted, if that works for you.
>
> What about -stable ?
>
> Seems like we should take this fix and your series should rebase on top
> of the fix instead of the corollary.
>
> That's the way this should work Fixes > New stuff.
>
> Can you add your Review-by/Tested-by and then rebase yourself ?
>
> ---
> bod
Agreed.
I'll rebase my series on top once this is applied.
Reviewed-by: Anvesh Jain P anvesh.p@xxxxxxxxxxxxxxxx
--
Best Regards,
Anvesh