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
  • fs
  • proc
  • array.c
Find file BlameHistoryPermalink
  • Oleg Nesterov's avatar
    fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children stats · 7601df80
    Oleg Nesterov authored Jan 23, 2024
    lock_task_sighand() can trigger a hard lockup.  If NR_CPUS threads call
    do_task_stat() at the same time and the process has NR_THREADS, it will
    spin with irqs disabled O(NR_CPUS * NR_THREADS) time.
    
    Change do_task_stat() to use sig->stats_lock to gather the statistics
    outside of ->siglock protected section, in the likely case this code will
    run lockless.
    
    Link: https://lkml.kernel.org/r/20240123153357.GA21857@redhat.com
    
    
    Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: default avatarDylan Hatch <dylanbhatch@google.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    7601df80
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7