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
  • include
  • linux
  • list_nulls.h
Find file BlameHistoryPermalink
  • Paul E. McKenney's avatar
    list: Use READ_ONCE() when testing for empty lists · 1658d35e
    Paul E. McKenney authored Sep 20, 2015
    
    
    Most of the list-empty-check macros (list_empty(), hlist_empty(),
    hlist_bl_empty(), hlist_nulls_empty(), and hlist_nulls_empty()) use
    an unadorned load to check the list header.  Given that these macros
    are sometimes invoked without the protection of a lock, this is
    not sufficient.  This commit therefore adds READ_ONCE() calls to
    them.  This commit does not touch llist_empty() because it already
    has the needed ACCESS_ONCE().
    
    Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    1658d35e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7