cgroup: refactor allow_attach handler for 4.4