{
#ifdef CONFIG_CGROUPS
void *page;
- char *s;
- page = (void *)__get_free_page(GFP_TEMPORARY);
+ page = (void *)__get_free_page(GFP_KERNEL);
if (!page)
return -ENOMEM;
- s = task_cgroup_path(current, page, PAGE_SIZE);
- if (s) {
- mp->cgroup = kstrdup(s, GFP_KERNEL);
+ if (task_cgroup_path(current, page, PAGE_SIZE) < PAGE_SIZE) {
+ mp->cgroup = kstrdup(page, GFP_KERNEL);
if (!mp->cgroup) {
free_page((unsigned long)page);
return -ENOMEM;
item = kdbus_write_head(&items, KDBUS_ITEM_AUXGROUPS,
info->ngroups * sizeof(u64));
for (i = 0; i < info->ngroups; ++i)
- item->data64[i] = from_kgid_munged(user_ns,
- GROUP_AT(info, i));
+ item->data64[i] = from_kgid_munged(user_ns, info->gid[i]);
}
if (staging->mp && (staging->mask & KDBUS_ATTACH_TID_COMM))
get_fs_root(current->fs, &p);
if (path_equal(&p, &conn->root_path)) {
- staging.exe = (void *)__get_free_page(GFP_TEMPORARY);
+ staging.exe = (void *)__get_free_page(GFP_KERNEL);
if (!staging.exe) {
path_put(&p);
ret = -ENOMEM;