summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-05-02 00:13:38 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-05-02 00:21:13 -0700
commit46f49b7a223ac7493e7cf619fb583d11edefc2c2 (patch)
tree89b9c43c0ed3e3939977c2f90eeb8c57f86fa99a /drivers/input/misc
parenteb71d1bb270ef6b2a9c1bfaa7818e1e75b3d4546 (diff)
downloadblackbird-op-linux-46f49b7a223ac7493e7cf619fb583d11edefc2c2.tar.gz
blackbird-op-linux-46f49b7a223ac7493e7cf619fb583d11edefc2c2.zip
Input: serio_raw - signal EFAULT even if read/write partially succeeds
When copy_to/from_user fails in the middle of transfer we should not report to the user that read/write partially succeeded but rather report -EFAULT right away, so that application will know that it got its buffers all wrong. If application messed up its buffers we can't trust the data fetched from userspace and successfully written to the device or if data read from the device and transferred to userspace ended up where application expected it to end. If serio_write() fails we still going to report partial writes if failure happens in the middle of the transfer. This is basically a revert of 7a0a27d2ce38aee19a31fee8c12095f586eed393 and 4fa0771138d0b56fe59ab8ab3b1ce9e594484362. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud