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
  • linux
  • kernel
  • locking
  • spinlock.c
Find file BlameHistoryPermalink
  • Will Deacon's avatar
    locking/core: Fix deadlock during boot on systems with GENERIC_LOCKBREAK · f87f3a32
    Will Deacon authored Nov 28, 2017
    Commit:
    
      a8a217c2
    
     ("locking/core: Remove {read,spin,write}_can_lock()")
    
    removed the definition of raw_spin_can_lock(), causing the GENERIC_LOCKBREAK
    spin_lock() routines to poll the ->break_lock field when waiting on a lock.
    
    This has been reported to cause a deadlock during boot on s390, because
    the ->break_lock field is also set by the waiters, and can potentially
    remain set indefinitely if no other CPUs come in to take the lock after
    it has been released.
    
    This patch removes the explicit spinning on ->break_lock from the waiters,
    instead relying on the outer trylock() operation to determine when the
    lock is available.
    
    Reported-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
    Tested-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Fixes: a8a217c2 ("locking/core: Remove {read,spin,write}_can_lock()")
    Link: http://lkml.kernel.org/r/1511894539-7988-2-git-send-email-will.deacon@arm.com
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    f87f3a32
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7