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
  • Dmitry Torokhov's avatar
    Input: fix use-after-free introduced with dynamic minor changes · 4a215aad
    Dmitry Torokhov authored Oct 21, 2012
    Commit 7f8d4cad
    
     ("Input: extend the number of event (and other)
    devices") made evdev, joydev and mousedev to embed struct cdev into
    their respective structures representing input devices.
    
    Unfortunately character device structure may outlive the parent
    structure unless we do not set it up as parent of character device so
    that it will stay pinned until character device is freed.
    
    Also, now that parent structure is pinned while character device exists
    we do not need to pin and unpin it every time user opens or closes it.
    
    Reported-by: default avatarDave Jones <davej@redhat.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    4a215aad
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7