android_kernel_motorola_sm6375/drivers/i2c
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xu Wang 871a1e9492 i2c: Fix a potential use after free
[ Upstream commit e4c72c06c367758a14f227c847f9d623f1994ecf ]

Free the adap structure only after we are done using it.
This patch just moves the put_device() down a bit to avoid the
use after free.

Fixes: 611e12ea0f ("i2c: core: manage i2c bus device refcount in i2c_[get|put]_adapter")
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
[wsa: added comment to the code, added Fixes tag]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-25 11:17:38 +02:00
..
algos
busses i2c: cadence: Change large transfer count reset logic to be unconditional 2022-07-29 17:14:12 +02:00
muxes i2c: mux: demux-pinctrl: do not deactivate a master that is not active 2022-04-15 14:18:16 +02:00
i2c-boardinfo.c
i2c-core-acpi.c i2c: acpi: fix resource leak in reconfiguration device addition 2021-10-13 10:08:20 +02:00
i2c-core-base.c i2c: Fix a potential use after free 2022-08-25 11:17:38 +02:00
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h
i2c-dev.c i2c: validate user data in compat ioctl 2022-01-05 12:37:45 +01:00
i2c-mux.c
i2c-slave-eeprom.c
i2c-smbus.c
i2c-stub.c
Kconfig
Makefile