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
  • bpf
  • queue_stack_maps.c
Find file BlameHistoryPermalink
  • Toke Høiland-Jørgensen's avatar
    bpf: Avoid deadlock when using queue and stack maps from NMI · a34a9f1a
    Toke Høiland-Jørgensen authored Sep 11, 2023
    Sysbot discovered that the queue and stack maps can deadlock if they are
    being used from a BPF program that can be called from NMI context (such as
    one that is attached to a perf HW counter event). To fix this, add an
    in_nmi() check and use raw_spin_trylock() in NMI context, erroring out if
    grabbing the lock fails.
    
    Fixes: f1a2e44a
    
     ("bpf: add queue and stack maps")
    Reported-by: default avatarHsin-Wei Hung <hsinweih@uci.edu>
    Tested-by: default avatarHsin-Wei Hung <hsinweih@uci.edu>
    Co-developed-by: default avatarHsin-Wei Hung <hsinweih@uci.edu>
    Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
    Link: https://lore.kernel.org/r/20230911132815.717240-1-toke@redhat.com
    
    
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    a34a9f1a
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7