• M
    cgroups: fix API thinko · 73457f0f
    Michael S. Tsirkin 提交于
    cgroup_attach_task_current_cg API that have upstream is backwards: we
    really need an API to attach to the cgroups from another process A to
    the current one.
    
    In our case (vhost), a priveledged user wants to attach it's task to cgroups
    from a less priveledged one, the API makes us run it in the other
    task's context, and this fails.
    
    So let's make the API generic and just pass in 'from' and 'to' tasks.
    Add an inline wrapper for cgroup_attach_task_current_cg to avoid
    breaking bisect.
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
    Acked-by: NPaul Menage <menage@google.com>
    73457f0f
cgroup.c 126.8 KB