summaryrefslogtreecommitdiffstats
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-05-06 10:56:07 +1000
committerJames Morris <jmorris@namei.org>2010-05-06 10:56:07 +1000
commit0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch)
tree81b1a2305d16c873371b65c5a863c0268036cefe /kernel/cred.c
parent4e5d6f7ec3833c0da9cf34fa5c53c6058c5908b6 (diff)
parent7ebd467551ed6ae200d7835a84bbda0dcadaa511 (diff)
downloadlinux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.gz
linux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.bz2
linux-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.zip
Merge branch 'master' into next
Diffstat (limited to 'kernel/cred.c')
-rw-r--r--kernel/cred.c5
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)