]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: fix attach to cgroups regression
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Sep 2010 11:05:30 +0000 (14:05 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 6 Sep 2010 06:49:31 +0000 (09:49 +0300)
commite3e25d33a6e9b3c351050edae0f2527036df1d7c
tree598f8fc4a19f9b52e531ab41a1c45796358956d1
parent801630372dea4fa24eac21b2042be6d914d68cff
vhost: fix attach to cgroups regression

Since 2.6.36-rc1, non-root users of vhost-net fail to attach
if they are in any cgroups.

The reason is that when qemu uses vhost, vhost wants to attach
its thread to all cgroups that qemu has.  But we got the API backwards,
so a non-priveledged process (Qemu) tried to control
the priveledged one (vhost), which fails.

Fix this by switching to the new cgroup_attach_task_all,
and running it from the vhost thread.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vhost.c