diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/livepatch/core.c | 10 | ||||
-rw-r--r-- | kernel/locking/rtmutex.c | 1 | ||||
-rw-r--r-- | kernel/sys.c | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index ff7f47d026ac..782172f073c5 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c | |||
@@ -314,12 +314,12 @@ static void notrace klp_ftrace_handler(unsigned long ip, | |||
314 | rcu_read_lock(); | 314 | rcu_read_lock(); |
315 | func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, | 315 | func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, |
316 | stack_node); | 316 | stack_node); |
317 | rcu_read_unlock(); | ||
318 | |||
319 | if (WARN_ON_ONCE(!func)) | 317 | if (WARN_ON_ONCE(!func)) |
320 | return; | 318 | goto unlock; |
321 | 319 | ||
322 | klp_arch_set_pc(regs, (unsigned long)func->new_func); | 320 | klp_arch_set_pc(regs, (unsigned long)func->new_func); |
321 | unlock: | ||
322 | rcu_read_unlock(); | ||
323 | } | 323 | } |
324 | 324 | ||
325 | static int klp_disable_func(struct klp_func *func) | 325 | static int klp_disable_func(struct klp_func *func) |
@@ -731,7 +731,7 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func) | |||
731 | func->state = KLP_DISABLED; | 731 | func->state = KLP_DISABLED; |
732 | 732 | ||
733 | return kobject_init_and_add(&func->kobj, &klp_ktype_func, | 733 | return kobject_init_and_add(&func->kobj, &klp_ktype_func, |
734 | obj->kobj, func->old_name); | 734 | obj->kobj, "%s", func->old_name); |
735 | } | 735 | } |
736 | 736 | ||
737 | /* parts of the initialization that is done only when the object is loaded */ | 737 | /* parts of the initialization that is done only when the object is loaded */ |
@@ -807,7 +807,7 @@ static int klp_init_patch(struct klp_patch *patch) | |||
807 | patch->state = KLP_DISABLED; | 807 | patch->state = KLP_DISABLED; |
808 | 808 | ||
809 | ret = kobject_init_and_add(&patch->kobj, &klp_ktype_patch, | 809 | ret = kobject_init_and_add(&patch->kobj, &klp_ktype_patch, |
810 | klp_root_kobj, patch->mod->name); | 810 | klp_root_kobj, "%s", patch->mod->name); |
811 | if (ret) | 811 | if (ret) |
812 | goto unlock; | 812 | goto unlock; |
813 | 813 | ||
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index e16e5542bf13..6357265a31ad 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
@@ -1193,6 +1193,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, | |||
1193 | ret = __rt_mutex_slowlock(lock, state, timeout, &waiter); | 1193 | ret = __rt_mutex_slowlock(lock, state, timeout, &waiter); |
1194 | 1194 | ||
1195 | if (unlikely(ret)) { | 1195 | if (unlikely(ret)) { |
1196 | __set_current_state(TASK_RUNNING); | ||
1196 | if (rt_mutex_has_waiters(lock)) | 1197 | if (rt_mutex_has_waiters(lock)) |
1197 | remove_waiter(lock, &waiter); | 1198 | remove_waiter(lock, &waiter); |
1198 | rt_mutex_handle_deadlock(ret, chwalk, &waiter); | 1199 | rt_mutex_handle_deadlock(ret, chwalk, &waiter); |
diff --git a/kernel/sys.c b/kernel/sys.c index 667b2e62fad2..a03d9cd23ed7 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1108,6 +1108,7 @@ DECLARE_RWSEM(uts_sem); | |||
1108 | /* | 1108 | /* |
1109 | * Work around broken programs that cannot handle "Linux 3.0". | 1109 | * Work around broken programs that cannot handle "Linux 3.0". |
1110 | * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 | 1110 | * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 |
1111 | * And we map 4.x to 2.6.60+x, so 4.0 would be 2.6.60. | ||
1111 | */ | 1112 | */ |
1112 | static int override_release(char __user *release, size_t len) | 1113 | static int override_release(char __user *release, size_t len) |
1113 | { | 1114 | { |
@@ -1127,7 +1128,7 @@ static int override_release(char __user *release, size_t len) | |||
1127 | break; | 1128 | break; |
1128 | rest++; | 1129 | rest++; |
1129 | } | 1130 | } |
1130 | v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; | 1131 | v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60; |
1131 | copy = clamp_t(size_t, len, 1, sizeof(buf)); | 1132 | copy = clamp_t(size_t, len, 1, sizeof(buf)); |
1132 | copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); | 1133 | copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); |
1133 | ret = copy_to_user(release, buf, copy + 1); | 1134 | ret = copy_to_user(release, buf, copy + 1); |