android_kernel_oneplus_msm8998/drivers/i2c
Stephen Douthit 043ccc9781 i2c: ismt: Return EMSGSIZE for block reads with bogus length
commit ba201c4f5ebe13d7819081756378777d8153f23e upstream.

Compare the number of bytes actually seen on the wire to the byte
count field returned by the slave device.

Previously we just overwrote the byte count returned by the slave
with the real byte count and let the caller figure out if the
message was sane.

Signed-off-by: Stephen Douthit <stephend@adiengineering.com>
Tested-by: Dan Priamo <danp@adiengineering.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-07 08:34:09 +02:00
..
algos i2c: algo-pca: fix typo in comment 2015-06-01 08:41:19 +09:00
busses i2c: ismt: Return EMSGSIZE for block reads with bogus length 2017-09-07 08:34:09 +02:00
muxes i2c: mux: fix up dependencies 2016-11-26 09:54:52 +01:00
i2c-boardinfo.c
i2c-core.c i2c: print correct device invalid address 2017-01-19 20:17:20 +01:00
i2c-core.h
i2c-dev.c i2c: fix kernel memory disclosure in dev interface 2017-01-19 20:17:20 +01: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
Kconfig i2c: mux: fix up dependencies 2016-11-26 09:54:52 +01:00
Makefile