diff options
| author | LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> | 2026-01-16 11:19:05 +0000 |
|---|---|---|
| committer | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2026-02-03 21:47:48 +0100 |
| commit | b126097b0327437048bd045a0e4d273dea2910dd (patch) | |
| tree | 5e1866c3d9fbea62e92efc3ef4e5756807063d61 /scripts | |
| parent | 18f7fcd5e69a04df57b563360b88be72471d6b62 (diff) | |
i2c: imx: preserve error state in block data length handler
When a block read returns an invalid length, zero or >I2C_SMBUS_BLOCK_MAX,
the length handler sets the state to IMX_I2C_STATE_FAILED. However,
i2c_imx_master_isr() unconditionally overwrites this with
IMX_I2C_STATE_READ_CONTINUE, causing an endless read loop that overruns
buffers and crashes the system.
Guard the state transition to preserve error states set by the length
handler.
Fixes: 5f5c2d4579ca ("i2c: imx: prevent rescheduling in non dma mode")
Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
Cc: <stable@vger.kernel.org> # v6.13+
Reviewed-by: Stefan Eichenberger <eichest@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260116111906.3413346-2-Qing-wu.Li@leica-geosystems.com.cn
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
