cgroup: pids: fix invalid get/put usage
authorAleksa Sarai <cyphar@cyphar.com>
Tue, 25 Aug 2015 02:50:44 +0000 (12:50 +1000)
committerTejun Heo <tj@kernel.org>
Tue, 25 Aug 2015 18:19:25 +0000 (14:19 -0400)
commitce52399520e4b97466165737e00c7b528ae8c8f5
tree3b81c86ac3758e9c35794b76a62b7965c3074750
parentcf780b7dc795ff495629b9879dc874eda49ada62
cgroup: pids: fix invalid get/put usage

Fix incorrect usage of css_get and css_put to put a different css in
pids_{cancel_,}attach() than the one grabbed in pids_can_attach(). This
could lead to quite serious memory leakage (and unsafe operations on the
putted css).

tj: minor comment update

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup_pids.c