Skip to content

cgroup: pids: fix invalid reference semantics

Aleksa Sarai cgroups lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cgroup: get a ref to source csses when migratingkernel/cgroup.c+19 -23 replies
2/2cgroup: pids: fix invalid get/put usagekernel/cgroup_pids.c+1 -121 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] cgroup: pids: fix invalid reference semantics

I've discovered a bug in the PIDs cgroup. We aren't properly dealing with css references (we grab a reference to a css in ->can_attach() and then drop a reference to a *different* css in ->{cancel_,}attach(). This is a quick patch I wrote which I believe fixes the problem by getting cgroup_migrate() to grab a reference before ->can_attach() and once the attach has failed or succeded.

Aleksa Sarai (2):
cgroup: get a ref to source csses when migrating
cgroup: pids: fix invalid get/put usage

 kernel/cgroup.c      | 21 +++++++++++++++++++--
 kernel/cgroup_pids.c | 13 +------------
 2 files changed, 20 insertions(+), 14 deletions(-)
Signature · 1 line
2.5.0