android_kernel_motorola_sm6375/drivers/i2c
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yang Xiwen cbec440699 i2c: qup: jump out of the loop in case of timeout
commit a7982a14b3012527a9583d12525cd0dc9f8d8934 upstream.

Original logic only sets the return value but doesn't jump out of the
loop if the bus is kept active by a client. This is not expected. A
malicious or buggy i2c client can hang the kernel in this case and
should be avoided. This is observed during a long time test with a
PCA953x GPIO extender.

Fix it by changing the logic to not only sets the return value, but also
jumps out of the loop and return to the caller with -ETIMEDOUT.

Fixes: fbfab1ab06 ("i2c: qup: reorganization of driver code to remove polling for qup v1")
Signed-off-by: Yang Xiwen <[email protected]>
Cc: <[email protected]> # v4.17+
Signed-off-by: Andi Shyti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-08-28 16:21:17 +02:00
..
algos
busses i2c: qup: jump out of the loop in case of timeout 2025-08-28 16:21:17 +02:00
muxes i2c: mux: demux-pinctrl: check initial mux selection, too 2025-02-01 18:18:50 +01:00
i2c-boardinfo.c
i2c-core-acpi.c
i2c-core-base.c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:18:37 +02:00
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h i2c: core: Fix atomic xfer check for non-preempt config 2024-01-15 18:25:27 +01:00
i2c-dev.c
i2c-mux.c i2c: mux: Avoid potential false error message in i2c_mux_add_adapter 2023-10-25 11:53:23 +02:00
i2c-slave-eeprom.c
i2c-smbus.c i2c: smbus: Send alert notifications to all devices if source not found 2024-08-19 05:33:50 +02:00
i2c-stub.c
Kconfig
Makefile