Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-rt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • David Runge
  • linux-rt
  • Repository
Switch branch/tag
  • linux-rt
  • kernel
  • locking
  • rtmutex.c
Find file BlameHistoryPermalink
  • Peter Zijlstra's avatar
    locking/rtmutex: Fix ww_mutex deadlock check · 30c3c85b
    Peter Zijlstra authored Sep 01, 2021
    Dan reported that rt_mutex_adjust_prio_chain() can be called with
    .orig_waiter == NULL however commit a055fcc1 ("locking/rtmutex:
    Return success on deadlock for ww_mutex waiters") unconditionally
    dereferences it.
    
    Since both call-sites that have .orig_waiter == NULL don't care for the
    return value, simply disable the deadlock squash by adding the NULL
    check.
    
    Notably, both callers use the deadlock condition as a termination
    condition for the iteration; once detected, we're sure (de)boosting is
    done. Arguably [3] would be a more natural termination point, but I'm
    not sure adding a third deadlock detection state would improve the code.
    
    Fixes: a055fcc1
    
     ("locking/rtmutex: Return success on deadlock for ww_mutex waiters")
    Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Link: https://lore.kernel.org/r/YS9La56fHMiCCo75@hirez.programming.kicks-ass.net
    30c3c85b

Replace rtmutex.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.