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
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • kthread.c
Find file BlameHistoryPermalink
  • Tetsuo Handa's avatar
    kthread: make kthread_create() killable · 786235ee
    Tetsuo Handa authored Nov 12, 2013
    
    
    Any user process callers of wait_for_completion() except global init
    process might be chosen by the OOM killer while waiting for completion()
    call by some other process which does memory allocation.  See
    CVE-2012-4398 "kernel: request_module() OOM local DoS" can happen.
    
    When such users are chosen by the OOM killer when they are waiting for
    completion() in TASK_UNINTERRUPTIBLE, the system will be kept stressed
    due to memory starvation because the OOM killer cannot kill such users.
    
    kthread_create() is one of such users and this patch fixes the problem
    for kthreadd by making kthread_create() killable - the same approach
    used for fixing CVE-2012-4398.
    
    Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Acked-by: default avatarDavid Rientjes <rientjes@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    786235ee
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7