Re: [PATCH] cgroup/pids: turn cgroup_subsys->free() into cgroup_subsys->release() to fix the accounting

2019-01-31 Thread Tejun Heo
On Mon, Jan 28, 2019 at 05:00:13PM +0100, Oleg Nesterov wrote: > The only user of cgroup_subsys->free() callback is pids_cgrp_subsys which > needs pids_free() to uncharge the pid. > > However, ->free() is called from __put_task_struct()->cgroup_free() and this > is too late. Even the trivial

[PATCH] cgroup/pids: turn cgroup_subsys->free() into cgroup_subsys->release() to fix the accounting

2019-01-28 Thread Oleg Nesterov
The only user of cgroup_subsys->free() callback is pids_cgrp_subsys which needs pids_free() to uncharge the pid. However, ->free() is called from __put_task_struct()->cgroup_free() and this is too late. Even the trivial program which does for (;;) { int pid = fork();