linux-stable/drivers/input
David Herrmann f40033acc2 Input: uinput - return -EINVAL when read buffer size is too small
Let's check whether the user-supplied buffer is actually big enough and
return -EINVAL if it is not. This differs from current behavior, which
caused 0 to be returned and actually does not make any sense, as
broken application will simply repeat the read getting into endless
loop.

Note that we treat 0 as a special case, according to the standard:

"Before any action described below is taken, and if nbyte is zero,
the read() function may detect and return errors as described below.
In the absence of errors, or if error detection is not performed,
the read() function shall return zero and have no other results."

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-08-21 22:29:53 -07:00
..
gameport Input: use module_pci_driver 2012-04-21 23:48:58 -07:00
joystick Merge branch 'for-linus' to bring in change ensuring that drivers that 2012-07-07 16:07:48 -07:00
keyboard Input: gpio_keys_polled - convert to dt 2012-08-21 22:29:50 -07:00
misc Input: uinput - return -EINVAL when read buffer size is too small 2012-08-21 22:29:53 -07:00
mouse Input: synaptics - handle out of bounds values from the hardware 2012-07-24 23:55:15 -07:00
serio Input: serio_raw - signal EFAULT even if read/write partially succeeds 2012-05-02 00:21:13 -07:00
tablet Input: wacom - add support to Cintiq 22HD 2012-07-24 23:55:10 -07:00
touchscreen Input: add driver for FT5x06 based EDT displays 2012-07-24 23:55:03 -07:00
apm-power.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
evbug.c Input: use pr_fmt and pr_<level> 2010-11-30 23:10:26 -08:00
evdev.c Input: evdev - properly handle read/write with count 0 2012-05-02 00:23:58 -07:00
ff-core.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
ff-memless.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
input-compat.c compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-compat.h compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-mt.c Input: MT - fix null pointer warning 2012-06-04 16:33:34 +02:00
input-polldev.c Merge commit 'v3.2-rc3' into next 2011-11-29 01:51:07 -08:00
input.c Input: get rid of MATCH_BIT() macro 2012-08-21 22:29:52 -07:00
joydev.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
Kconfig Input: matrix-keymap - uninline and prepare for device tree support 2012-05-10 22:38:47 -07:00
Makefile Input: matrix-keymap - uninline and prepare for device tree support 2012-05-10 22:38:47 -07:00
matrix-keymap.c Input: matrix-keymap - fix building keymaps 2012-05-24 01:12:20 -07:00
mousedev.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
sparse-keymap.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00