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
  • buffer_head.h
Find file BlameHistoryPermalink
  • Mikulas Patocka's avatar
    wait_on_bit: add an acquire memory barrier · 8238b457
    Mikulas Patocka authored Aug 26, 2022
    
    
    There are several places in the kernel where wait_on_bit is not followed
    by a memory barrier (for example, in drivers/md/dm-bufio.c:new_read).
    
    On architectures with weak memory ordering, it may happen that memory
    accesses that follow wait_on_bit are reordered before wait_on_bit and
    they may return invalid data.
    
    Fix this class of bugs by introducing a new function "test_bit_acquire"
    that works like test_bit, but has acquire memory ordering semantics.
    
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Acked-by: default avatarWill Deacon <will@kernel.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    8238b457
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7