projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for...
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
cgroup.c
diff --git
a/kernel/cgroup.c
b/kernel/cgroup.c
index a63507b92ca462073b6651e7d07640c48f26a933..1d2b6ceea95d9d268191a76fd486e7958cc2d05c 100644
(file)
--- a/
kernel/cgroup.c
+++ b/
kernel/cgroup.c
@@
-27,9
+27,11
@@
*/
#include <linux/cgroup.h>
*/
#include <linux/cgroup.h>
+#include <linux/cred.h>
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/init_task.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mm.h>
@@
-59,7
+61,7
@@
#include <linux/poll.h>
#include <linux/flex_array.h> /* used in cgroup_attach_proc */
#include <linux/poll.h>
#include <linux/flex_array.h> /* used in cgroup_attach_proc */
-#include <
asm
/atomic.h>
+#include <
linux
/atomic.h>
static DEFINE_MUTEX(cgroup_mutex);
static DEFINE_MUTEX(cgroup_mutex);
@@
-1514,6
+1516,7
@@
static struct dentry *cgroup_mount(struct file_system_type *fs_type,
struct cgroup *root_cgrp = &root->top_cgroup;
struct inode *inode;
struct cgroupfs_root *existing_root;
struct cgroup *root_cgrp = &root->top_cgroup;
struct inode *inode;
struct cgroupfs_root *existing_root;
+ const struct cred *cred;
int i;
BUG_ON(sb->s_root != NULL);
int i;
BUG_ON(sb->s_root != NULL);
@@
-1593,7
+1596,9
@@
static struct dentry *cgroup_mount(struct file_system_type *fs_type,
BUG_ON(!list_empty(&root_cgrp->children));
BUG_ON(root->number_of_cgroups != 1);
BUG_ON(!list_empty(&root_cgrp->children));
BUG_ON(root->number_of_cgroups != 1);
+ cred = override_creds(&init_cred);
cgroup_populate_dir(root_cgrp);
cgroup_populate_dir(root_cgrp);
+ revert_creds(cred);
mutex_unlock(&cgroup_mutex);
mutex_unlock(&inode->i_mutex);
} else {
mutex_unlock(&cgroup_mutex);
mutex_unlock(&inode->i_mutex);
} else {