diff options
author | James Morris <jmorris@namei.org> | 2010-05-06 02:56:07 +0200 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-05-06 02:56:07 +0200 |
commit | 0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch) | |
tree | 81b1a2305d16c873371b65c5a863c0268036cefe /kernel/cred.c | |
parent | TOMOYO: Use GFP_NOFS rather than GFP_KERNEL. (diff) | |
parent | Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/air... (diff) | |
download | linux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.xz linux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.zip |
Merge branch 'master' into next
Diffstat (limited to 'kernel/cred.c')
-rw-r--r-- | kernel/cred.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/cred.c b/kernel/cred.c index fecb34640482..31f38a99adf7 100644 --- a/kernel/cred.c +++ b/kernel/cred.c @@ -10,6 +10,7 @@ */ #include <linux/module.h> #include <linux/cred.h> +#include <linux/slab.h> #include <linux/sched.h> #include <linux/key.h> #include <linux/keyctl.h> @@ -397,6 +398,8 @@ struct cred *prepare_usermodehelper_creds(void) error: put_cred(new); + return NULL; + free_tgcred: #ifdef CONFIG_KEYS kfree(tgcred); @@ -788,8 +791,6 @@ bool creds_are_invalid(const struct cred *cred) { if (cred->magic != CRED_MAGIC) return true; - if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers)) - return true; #ifdef CONFIG_SECURITY_SELINUX if (selinux_is_enabled()) { if ((unsigned long) cred->security < PAGE_SIZE) |