From f2662fd55aafaf69ecc30e1749144bfa52dbb14a Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 7 Jul 2012 15:55:47 -0700 Subject: [PATCH] --- yaml --- r: 311731 b: refs/heads/master c: 7db5b3ca0ecdb2e8fad52a4770e4e320e61c77a6 h: refs/heads/master i: 311729: 4346c442503e5670bda77bd7999eb63718707970 311727: 2495d2d42534db3b8634f1f907874f04cdb86d66 v: v3 --- [refs] | 2 +- trunk/Documentation/prctl/no_new_privs.txt | 7 ------- trunk/Makefile | 2 +- trunk/fs/open.c | 6 +++--- trunk/include/linux/prctl.h | 2 -- trunk/kernel/cgroup.c | 17 +++-------------- 6 files changed, 8 insertions(+), 28 deletions(-) diff --git a/[refs] b/[refs] index f555dca672c9..14ce663e26c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bd0a521e88aa7a06ae7aabaed7ae196ed4ad867a +refs/heads/master: 7db5b3ca0ecdb2e8fad52a4770e4e320e61c77a6 diff --git a/trunk/Documentation/prctl/no_new_privs.txt b/trunk/Documentation/prctl/no_new_privs.txt index f7be84fba910..cb705ec69abe 100644 --- a/trunk/Documentation/prctl/no_new_privs.txt +++ b/trunk/Documentation/prctl/no_new_privs.txt @@ -25,13 +25,6 @@ bits will no longer change the uid or gid; file capabilities will not add to the permitted set, and LSMs will not relax constraints after execve. -To set no_new_privs, use prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0). - -Be careful, though: LSMs might also not tighten constraints on exec -in no_new_privs mode. (This means that setting up a general-purpose -service launcher to set no_new_privs before execing daemons may -interfere with LSM-based sandboxing.) - Note that no_new_privs does not prevent privilege changes that do not involve execve. An appropriately privileged task can still call setuid(2) and receive SCM_RIGHTS datagrams. diff --git a/trunk/Makefile b/trunk/Makefile index bf02707a5e9b..81ea15450049 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 5 SUBLEVEL = 0 -EXTRAVERSION = -rc6 +EXTRAVERSION = -rc5 NAME = Saber-toothed Squirrel # *DOCUMENTATION* diff --git a/trunk/fs/open.c b/trunk/fs/open.c index 1540632d8387..d6c79a0dffc7 100644 --- a/trunk/fs/open.c +++ b/trunk/fs/open.c @@ -397,10 +397,10 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) { struct file *file; struct inode *inode; - int error, fput_needed; + int error; error = -EBADF; - file = fget_raw_light(fd, &fput_needed); + file = fget(fd); if (!file) goto out; @@ -414,7 +414,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) if (!error) set_fs_pwd(current->fs, &file->f_path); out_putf: - fput_light(file, fput_needed); + fput(file); out: return error; } diff --git a/trunk/include/linux/prctl.h b/trunk/include/linux/prctl.h index 289760f424aa..3988012255dc 100644 --- a/trunk/include/linux/prctl.h +++ b/trunk/include/linux/prctl.h @@ -141,8 +141,6 @@ * Changing LSM security domain is considered a new privilege. So, for example, * asking selinux for a specific new context (e.g. with runcon) will result * in execve returning -EPERM. - * - * See Documentation/prctl/no_new_privs.txt for more details. */ #define PR_SET_NO_NEW_PRIVS 38 #define PR_GET_NO_NEW_PRIVS 39 diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 2097684cf194..5f134a0e0e3f 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -901,13 +901,10 @@ static void cgroup_diput(struct dentry *dentry, struct inode *inode) mutex_unlock(&cgroup_mutex); /* - * We want to drop the active superblock reference from the - * cgroup creation after all the dentry refs are gone - - * kill_sb gets mighty unhappy otherwise. Mark - * dentry->d_fsdata with cgroup_diput() to tell - * cgroup_d_release() to call deactivate_super(). + * Drop the active superblock reference that we took when we + * created the cgroup */ - dentry->d_fsdata = cgroup_diput; + deactivate_super(cgrp->root->sb); /* * if we're getting rid of the cgroup, refcount should ensure @@ -933,13 +930,6 @@ static int cgroup_delete(const struct dentry *d) return 1; } -static void cgroup_d_release(struct dentry *dentry) -{ - /* did cgroup_diput() tell me to deactivate super? */ - if (dentry->d_fsdata == cgroup_diput) - deactivate_super(dentry->d_sb); -} - static void remove_dir(struct dentry *d) { struct dentry *parent = dget(d->d_parent); @@ -1547,7 +1537,6 @@ static int cgroup_get_rootdir(struct super_block *sb) static const struct dentry_operations cgroup_dops = { .d_iput = cgroup_diput, .d_delete = cgroup_delete, - .d_release = cgroup_d_release, }; struct inode *inode =