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
  • cgroup.c
Find file BlameHistoryPermalink
  • Ben Blum's avatar
    cgroups: don't attach task to subsystem if migration failed · 77ceab8e
    Ben Blum authored Nov 02, 2011
    
    
    If a task has exited to the point it has called cgroup_exit() already,
    then we can't migrate it to another cgroup anymore.
    
    This can happen when we are attaching a task to a new cgroup between the
    call to ->can_attach_task() on subsystems and the migration that is
    eventually tried in cgroup_task_migrate().
    
    In this case cgroup_task_migrate() returns -ESRCH and we don't want to
    attach the task to the subsystems because the attachment to the new cgroup
    itself failed.
    
    Fix this by only calling ->attach_task() on the subsystems if the cgroup
    migration succeeded.
    
    Reported-by: default avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: default avatarBen Blum <bblum@andrew.cmu.edu>
    Acked-by: default avatarPaul Menage <paul@paulmenage.org>
    Cc: Li Zefan <lizf@cn.fujitsu.com>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    77ceab8e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7