diff options
author | James Morris <jmorris@namei.org> | 2010-05-06 04:56:07 +0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-05-06 04:56:07 +0400 |
commit | 0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch) | |
tree | 81b1a2305d16c873371b65c5a863c0268036cefe /kernel/cred.c | |
parent | 4e5d6f7ec3833c0da9cf34fa5c53c6058c5908b6 (diff) | |
parent | 7ebd467551ed6ae200d7835a84bbda0dcadaa511 (diff) | |
download | linux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.xz |
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) |