Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • drivers
  • input
  • evdev.c
Find file BlameHistoryPermalink
  • Peter Korsgaard's avatar
    Input: evdev - fix evdev_write return value on partial writes · 439581ec
    Peter Korsgaard authored Feb 25, 2011
    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: default avatarBaruch Siach <baruch@tkos.co.il>
    Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
    Acked-by: default avatarHenrik Rydberg <rydberg@euromail.se>
    Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
    439581ec
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7