lkml.org 
[lkml]   [2013]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] uinput: Support injecting multiple events in one write() call
    Hi Ryan,

    On Wed, Sep 18, 2013 at 08:55:44AM +1000, Ryan Mallon wrote:
    > Rework the code in uinput_inject_event so that it matches the code in
    > evdev_write and allows injecting more than one event, or zero events.

    After some thinking I went back to the original version of your patch.
    For justification see 46f49b7a223ac7493e7cf619fb583d11edefc2c2:

    "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."

    Thanks.

    --
    Dmitry


    \
     
     \ /
      Last update: 2013-09-18 22:21    [W:3.356 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site