summaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
authorPeter Korsgaard2011-02-25 18:30:46 +0100
committerDmitry Torokhov2011-02-27 10:52:53 +0100
commit439581ec07fa9cf3f519dd461a2cf41cfd3adcb4 (patch)
tree204e640e88005bfcda1176d28ecc9325fbf57ad3 /include/linux/input
parentInput: bcm5974 - Report button also for zero fingers (diff)
downloadkernel-qcow2-linux-439581ec07fa9cf3f519dd461a2cf41cfd3adcb4.tar.gz
kernel-qcow2-linux-439581ec07fa9cf3f519dd461a2cf41cfd3adcb4.tar.xz
kernel-qcow2-linux-439581ec07fa9cf3f519dd461a2cf41cfd3adcb4.zip
Input: evdev - fix evdev_write return value on partial writes
As was recently brought up on the busybox list (http://lists.busybox.net/pipermail/busybox/2011-January/074565.html), evdev_write doesn't properly check the count argument, which will lead to a return value > count on partial writes if the remaining bytes are accessible - causing userspace confusion. Fix it by only handling each full input_event structure and return -EINVAL if less than 1 struct was written, similar to how it is done in evdev_read. Reported-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input')
0 files changed, 0 insertions, 0 deletions