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
  • lib
  • debugobjects.c
Find file BlameHistoryPermalink
  • Andrzej Hajda's avatar
    debugobjects: Stop accessing objects after releasing hash bucket lock · 9bb63626
    Andrzej Hajda authored Oct 25, 2023
    
    
    After release of the hashbucket lock the tracking object can be modified or
    freed by a concurrent thread.  Using it in such a case is error prone, even
    for printing the object state:
    
        1. T1 tries to deactivate destroyed object, debugobjects detects it,
           hash bucket lock is released.
    
        2. T2 preempts T1 and frees the tracking object.
    
        3. The freed tracking object is allocated and initialized for a
           different to be tracked kernel object.
    
        4. T1 resumes and reports error for wrong kernel object.
    
    Create a local copy of the tracking object before releasing the hash bucket
    lock and use the local copy for reporting and fixups to prevent this.
    
    Signed-off-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20231025-debugobjects_fix-v3-1-2bc3bf7084c2@intel.com
    9bb63626
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7