android_kernel_samsung_a7y1.../drivers/i2c
Yingjoe Chen 433b89b716 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: 838bfa6049fb ("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>
2020-04-06 19:04:00 +02:00
..
algos A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
busses i2c: acorn: fix i2c warning 2020-04-06 19:03:02 +02:00
muxes A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c-boardinfo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c-core.c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2020-04-06 14:02:20 +02:00
i2c-core.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c-dev.c i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr 2020-04-06 19:04:00 +02:00
i2c-mux.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c-slave-eeprom.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c-smbus.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c-stub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30