]> git.baikalelectronics.ru Git - kernel.git/commit
i2c-dev: Reject I2C_M_RECV_LEN
authorDavid Brownell <david-b@pacbell.net>
Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)
committerJean Delvare <khali@hyperion.delvare>
Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)
commita0aab260c44f446ccb73f3e93a931456cbf721a8
treead50706c7cbf75a9302b6e244b22d93babb415c1
parent9521f05ac73c54b29933f64e8a04193f14f4abab
i2c-dev: Reject I2C_M_RECV_LEN

The I2C_M_RECV_LEN calling convention for i2c_mesg.flags involves
playing games with reported buffer lengths.  (They start out less
than their actual size, and the length is then modified to reflect
how many bytes were delivered ... which one hopes is less than the
presumed actual size.)  Refuse to play such error prone games across
the boundary between userspace and kernel.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/i2c-dev.c