From: matthieu castet Date: Wed, 20 May 2009 08:42:33 +0000 (-0300) Subject: V4L/DVB (11832): dibusb_mc: fix i2c to not corrupt eeprom in case of strange read... X-Git-Tag: v2.6.31-rc1~297^2~162 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81dae6716f13e801cfe2035514e7aeb971b57492;p=pandora-kernel.git V4L/DVB (11832): dibusb_mc: fix i2c to not corrupt eeprom in case of strange read pattern dibusb_i2c_xfer seems to do things very dangerous : it assumes that it get only write/read request or write request. That means that read can be understood as write. For example a program doing file = open("/dev/i2c-x", O_RDWR); ioctl(file, I2C_SLAVE, 0x50) read(file, data, 10) will corrupt the eeprom as it will be understood as a write. Signed-off-by: Matthieu CASTET Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed