Re: [PATCH] platform: arm64: qcom-hamoa-ec: reject incomplete responses
Bryan O'Donoghue <[email protected]> Wed, 29 Jul 2026 11:23:09 +0100
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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<[email protected]> 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