diff options
Diffstat (limited to 'kernel/cred.c')
-rw-r--r-- | kernel/cred.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cred.c b/kernel/cred.c index 4f483be5944c..8f3672a58a1e 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
@@ -397,6 +397,8 @@ struct cred *prepare_usermodehelper_creds(void) | |||
397 | 397 | ||
398 | error: | 398 | error: |
399 | put_cred(new); | 399 | put_cred(new); |
400 | return NULL; | ||
401 | |||
400 | free_tgcred: | 402 | free_tgcred: |
401 | #ifdef CONFIG_KEYS | 403 | #ifdef CONFIG_KEYS |
402 | kfree(tgcred); | 404 | kfree(tgcred); |
@@ -788,8 +790,6 @@ bool creds_are_invalid(const struct cred *cred) | |||
788 | { | 790 | { |
789 | if (cred->magic != CRED_MAGIC) | 791 | if (cred->magic != CRED_MAGIC) |
790 | return true; | 792 | return true; |
791 | if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers)) | ||
792 | return true; | ||
793 | #ifdef CONFIG_SECURITY_SELINUX | 793 | #ifdef CONFIG_SECURITY_SELINUX |
794 | if (selinux_is_enabled()) { | 794 | if (selinux_is_enabled()) { |
795 | if ((unsigned long) cred->security < PAGE_SIZE) | 795 | if ((unsigned long) cred->security < PAGE_SIZE) |