linux-stable/drivers/i2c
Wolfram Sang 40f1d79f07 i2c: smbus: fix NULL function pointer dereference
[ Upstream commit 91811a31b6 ]

Baruch reported an OOPS when using the designware controller as target
only. Target-only modes break the assumption of one transfer function
always being available. Fix this by always checking the pointer in
__i2c_transfer.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Closes: https://lore.kernel.org/r/4269631780e5ba789cf1ae391eec1b959def7d99.1712761976.git.baruch@tkos.co.il
Fixes: 4b1acc4333 ("i2c: core changes for slave support")
[wsa: dropped the simplification in core-smbus to avoid theoretical regressions]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:17:14 +02:00
..
algos i2c: algo: pca: Reapply i2c bus settings after reset 2020-09-23 12:10:59 +02:00
busses i2c: s3c24xx: fix transferring more than one message in polling mode 2024-01-25 14:33:39 -08:00
muxes i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() 2023-11-08 11:22:16 +01:00
Kconfig
Makefile
i2c-boardinfo.c
i2c-core-acpi.c i2c: acpi: fix resource leak in reconfiguration device addition 2021-10-13 10:10:52 +02:00
i2c-core-base.c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:17:14 +02:00
i2c-core-of.c i2c: core: fix use after free in of_i2c_notify 2019-12-13 08:51:07 +01:00
i2c-core-slave.c i2c: slave: add sanity check when unregistering 2020-08-11 15:32:33 +02:00
i2c-core-smbus.c i2c: core: check returned size of emulated smbus block read 2020-06-30 23:17:13 -04:00
i2c-core.h
i2c-dev.c i2c: validate user data in compat ioctl 2022-01-05 12:34:59 +01:00
i2c-mux.c i2c: mux: Avoid potential false error message in i2c_mux_add_adapter 2023-10-25 11:16:53 +02:00
i2c-slave-eeprom.c
i2c-smbus.c
i2c-stub.c