diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cred.c | 4 | ||||
| -rw-r--r-- | kernel/sys.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/cred.c b/kernel/cred.c index e1dbe9eef800..62af1816c235 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
| @@ -398,6 +398,8 @@ struct cred *prepare_usermodehelper_creds(void) | |||
| 398 | 398 | ||
| 399 | error: | 399 | error: |
| 400 | put_cred(new); | 400 | put_cred(new); |
| 401 | return NULL; | ||
| 402 | |||
| 401 | free_tgcred: | 403 | free_tgcred: |
| 402 | #ifdef CONFIG_KEYS | 404 | #ifdef CONFIG_KEYS |
| 403 | kfree(tgcred); | 405 | kfree(tgcred); |
| @@ -791,8 +793,6 @@ bool creds_are_invalid(const struct cred *cred) | |||
| 791 | { | 793 | { |
| 792 | if (cred->magic != CRED_MAGIC) | 794 | if (cred->magic != CRED_MAGIC) |
| 793 | return true; | 795 | return true; |
| 794 | if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers)) | ||
| 795 | return true; | ||
| 796 | #ifdef CONFIG_SECURITY_SELINUX | 796 | #ifdef CONFIG_SECURITY_SELINUX |
| 797 | if (selinux_is_enabled()) { | 797 | if (selinux_is_enabled()) { |
| 798 | if ((unsigned long) cred->security < PAGE_SIZE) | 798 | if ((unsigned long) cred->security < PAGE_SIZE) |
diff --git a/kernel/sys.c b/kernel/sys.c index 6d1a7e0f9d5b..7cb426a58965 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -1118,7 +1118,7 @@ DECLARE_RWSEM(uts_sem); | |||
| 1118 | 1118 | ||
| 1119 | #ifdef COMPAT_UTS_MACHINE | 1119 | #ifdef COMPAT_UTS_MACHINE |
| 1120 | #define override_architecture(name) \ | 1120 | #define override_architecture(name) \ |
| 1121 | (current->personality == PER_LINUX32 && \ | 1121 | (personality(current->personality) == PER_LINUX32 && \ |
| 1122 | copy_to_user(name->machine, COMPAT_UTS_MACHINE, \ | 1122 | copy_to_user(name->machine, COMPAT_UTS_MACHINE, \ |
| 1123 | sizeof(COMPAT_UTS_MACHINE))) | 1123 | sizeof(COMPAT_UTS_MACHINE))) |
| 1124 | #else | 1124 | #else |
