android_kernel_oneplus_msm8998/drivers/i2c
Yingjoe Chen d5a18c8609 i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr
[ Upstream commit a0692f0eef91354b62c2b4c94954536536be5425 ]

If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user
will not be freed. Pump index up so it will be freed.

Fixes: 838bfa6049 ("i2c-dev: Add support for I2C_M_RECV_LEN")
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-22 08:18:26 +02:00
..
algos i2c: algo-pca: fix typo in comment 2015-06-01 08:41:19 +09:00
busses i2c: acorn: fix i2c warning 2019-06-22 08:18:22 +02:00
muxes i2c: mux: fix up dependencies 2016-11-26 09:54:52 +01:00
i2c-boardinfo.c i2c: remove __init from i2c_register_board_info() 2018-02-25 11:03:48 +01:00
i2c-core.c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2019-04-27 09:33:47 +02:00
i2c-core.h i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-dev.c i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr 2019-06-22 08:18:26 +02:00
i2c-mux.c i2c: add ACPI support for I2C mux ports 2015-10-25 15:49:46 +01:00
i2c-slave-eeprom.c i2c: Drop owner assignment from i2c_driver 2015-08-10 08:37:35 +02:00
i2c-smbus.c i2c: smbus: fix typo in commet 2015-06-01 08:41:26 +09:00
i2c-stub.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
Kconfig i2c: mux: fix up dependencies 2016-11-26 09:54:52 +01:00
Makefile i2c: slave-eeprom: add eeprom simulator driver 2014-12-11 22:25:54 +01:00