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
  • kernel
  • futex.c
Find file BlameHistoryPermalink
  • Peter Zijlstra's avatar
    futex: Fix pi_state->owner serialization · c74aef2d
    Peter Zijlstra authored Sep 22, 2017
    There was a reported suspicion about a race between exit_pi_state_list()
    and put_pi_state(). The same report mentioned the comment with
    put_pi_state() said it should be called with hb->lock held, and it no
    longer is in all places.
    
    As it turns out, the pi_state->owner serialization is indeed broken. As per
    the new rules:
    
      734009e9 ("futex: Change locking rules")
    
    pi_state->owner should be serialized by pi_state->pi_mutex.wait_lock.
    For the sites setting pi_state->owner we already hold wait_lock (where
    required) but exit_pi_state_list() and put_pi_state() were not and
    raced on clearing it.
    
    Fixes: 734009e9
    
     ("futex: Change locking rules")
    Reported-by: default avatarGratian Crisan <gratian.crisan@ni.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: dvhart@infradead.org
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20170922154806.jd3ffltfk24m4o4y@hirez.programming.kicks-ass.net
    c74aef2d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7