[Devel] [PATCH rh7] ve: device cgroup -- Implement devcgroup_seq_show_ve
Vladimir Davydov
vdavydov at parallels.com
Mon May 18 09:33:41 PDT 2015
On Mon, May 18, 2015 at 01:22:22PM +0300, Cyrill Gorcunov wrote:
> --- linux-pcs7.git.orig/security/device_cgroup.c
> +++ linux-pcs7.git/security/device_cgroup.c
> @@ -1091,10 +1091,16 @@ int devcgroup_set_perms_ve(struct cgroup
> }
> EXPORT_SYMBOL(devcgroup_set_perms_ve);
>
> -int devcgroup_seq_show_ve(struct cgroup *cgroup, unsigned veid, struct seq_file *m)
> +int devcgroup_seq_show_ve(struct cgroup *devices_root, envid_t veid, struct seq_file *m)
> {
> - struct dev_cgroup *devcgroup = cgroup_to_devcgroup(cgroup);
> struct dev_exception_item *wh;
> + struct dev_cgroup *devcgroup;
> + struct cgroup *cgroup;
> +
> + cgroup = ve_cgroup_open(devices_root, 0, veid);
For uuid-named cgroups ve->veid != cgroup name. You should use ve->name
instead. Please fix.
> + if (IS_ERR(cgroup))
> + return PTR_ERR(cgroup);
> + devcgroup = cgroup_to_devcgroup(cgroup);
>
> rcu_read_lock();
> list_for_each_entry_rcu(wh, &devcgroup->exceptions, list) {
> @@ -1118,6 +1124,7 @@ int devcgroup_seq_show_ve(struct cgroup
> }
> rcu_read_unlock();
>
> + cgroup_kernel_close(cgroup);
> return 0;
> }
> EXPORT_SYMBOL(devcgroup_seq_show_ve);
>
More information about the Devel
mailing list