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
  • exit.c
Find file BlameHistoryPermalink
  • Oleg Nesterov's avatar
    exit: fix race between wait_consider_task() and wait_task_zombie() · 3245d6ac
    Oleg Nesterov authored Jan 08, 2015
    wait_consider_task() checks EXIT_ZOMBIE after EXIT_DEAD/EXIT_TRACE and
    both checks can fail if we race with EXIT_ZOMBIE -> EXIT_DEAD/EXIT_TRACE
    change in between, gcc needs to reload p->exit_state after
    security_task_wait().  In this case ->notask_error will be wrongly
    cleared and do_wait() can hang forever if it was the last eligible
    child.
    
    Many thanks to Arne who carefully investigated the problem.
    
    Note: this bug is very old but it was pure theoretical until commit
    b3ab0316
    
     ("wait: completely ignore the EXIT_DEAD tasks").  Before
    this commit "-O2" was probably enough to guarantee that compiler won't
    read ->exit_state twice.
    
    Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
    Reported-by: default avatarArne Goedeke <el@laramies.com>
    Tested-by: default avatarArne Goedeke <el@laramies.com>
    Cc: <stable@vger.kernel.org>	[3.15+]
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    3245d6ac
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7