diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cred.c | 4 | ||||
| -rw-r--r-- | kernel/power/user.c | 2 | ||||
| -rw-r--r-- | kernel/rcupdate.c | 7 | ||||
| -rw-r--r-- | kernel/sys.c | 2 |
4 files changed, 11 insertions, 4 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/power/user.c b/kernel/power/user.c index 4d2289626a84..a8c96212bc1b 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
| @@ -420,7 +420,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, | |||
| 420 | * User space encodes device types as two-byte values, | 420 | * User space encodes device types as two-byte values, |
| 421 | * so we need to recode them | 421 | * so we need to recode them |
| 422 | */ | 422 | */ |
| 423 | swdev = old_decode_dev(swap_area.dev); | 423 | swdev = new_decode_dev(swap_area.dev); |
| 424 | if (swdev) { | 424 | if (swdev) { |
| 425 | offset = swap_area.offset; | 425 | offset = swap_area.offset; |
| 426 | data->swap = swap_type_of(swdev, offset, NULL); | 426 | data->swap = swap_type_of(swdev, offset, NULL); |
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 63fe25433980..03a7ea1579f6 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
| @@ -69,6 +69,13 @@ EXPORT_SYMBOL_GPL(rcu_scheduler_active); | |||
| 69 | 69 | ||
| 70 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 70 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 71 | 71 | ||
| 72 | int debug_lockdep_rcu_enabled(void) | ||
| 73 | { | ||
| 74 | return rcu_scheduler_active && debug_locks && | ||
| 75 | current->lockdep_recursion == 0; | ||
| 76 | } | ||
| 77 | EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); | ||
| 78 | |||
| 72 | /** | 79 | /** |
| 73 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 80 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? |
| 74 | * | 81 | * |
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 |
