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
  • drivers
  • android
  • binder_alloc.c
Find file BlameHistoryPermalink
  • Carlos Llamas's avatar
    binder: reverse locking order in shrinker callback · e50f4e6c
    Carlos Llamas authored Dec 01, 2023
    
    
    The locking order currently requires the alloc->mutex to be acquired
    first followed by the mmap lock. However, the alloc->mutex is converted
    into a spinlock in subsequent commits so the order needs to be reversed
    to avoid nesting the sleeping mmap lock under the spinlock.
    
    The shrinker's callback binder_alloc_free_page() is the only place that
    needs to be reordered since other functions have been refactored and no
    longer nest these locks.
    
    Some minor cosmetic changes are also included in this patch.
    
    Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
    Link: https://lore.kernel.org/r/20231201172212.1813387-28-cmllamas@google.com
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e50f4e6c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7