Skip to content

cgroup: fix race between cgroup_post_fork() and cgroup_migrate()

Oleg Nesterov lkml 1 version Applied

Status from this message: Applied to cgroup/for-4.5.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3cgroup: pids: fix race between cgroup_post_fork() and cgroup_migrate()kernel/cgroup_pids.c kernel/fork.c+5 -250 replies
2/3cgroup: pids: kill pids_fork(), simplify pids_can_fork() and pids_cancel_fork()kernel/cgroup_pids.c+10 -310 replies
3/3cgroup: kill cgrp_ss_priv[CGROUP_CANFORK_COUNT] and friendsinclude/linux/cgroup-defs.h include/linux/cgroup.h include/linux/cgroup_subsys.h +5 more+23 -711 reply

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchZefan Li
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] cgroup: fix race between cgroup_post_fork() and cgroup_migrate()
Quoted 4 lines · Oleg Nesterov

OK. I do not know what exactly do you mean, perhaps if you fix this problem the race between fork and attach goes away and in this case the fix I sent is not needed?

Otherwise please consider this series.

Slightly tested, seems to work; please review.

Oleg.

 include/linux/cgroup-defs.h   |   12 ++------
 include/linux/cgroup.h        |   19 ++++---------
 include/linux/cgroup_subsys.h |   18 ------------
 kernel/cgroup.c               |   30 +++++----------------
 kernel/cgroup_freezer.c       |    2 +-
 kernel/cgroup_pids.c          |   58 +++++++---------------------------------
 kernel/fork.c                 |   16 ++++-------
 kernel/sched/core.c           |    2 +-
 8 files changed, 34 insertions(+), 123 deletions(-)