summaryrefslogtreecommitdiffstats
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 22:59:25 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 22:59:25 +0100
commit1a7d0f0bec4be078ce2cfb11538c0f4ffbbed8e5 (patch)
tree266fafec84391c21383cfad7e6ae5ef6131f3ff1 /kernel/cred.c
parentMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 (diff)
parentCRED: Fix commit_creds() on a process that has no mm (diff)
downloadlinux-1a7d0f0bec4be078ce2cfb11538c0f4ffbbed8e5.tar.xz
linux-1a7d0f0bec4be078ce2cfb11538c0f4ffbbed8e5.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: CRED: Fix commit_creds() on a process that has no mm
Diffstat (limited to 'kernel/cred.c')
-rw-r--r--kernel/cred.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cred.c b/kernel/cred.c
index 043f78c133c4..3a039189d707 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -372,7 +372,8 @@ int commit_creds(struct cred *new)
old->fsuid != new->fsuid ||
old->fsgid != new->fsgid ||
!cap_issubset(new->cap_permitted, old->cap_permitted)) {
- set_dumpable(task->mm, suid_dumpable);
+ if (task->mm)
+ set_dumpable(task->mm, suid_dumpable);
task->pdeath_signal = 0;
smp_wmb();
}