From: Jiri Kosina Date: Mon, 13 Apr 2015 21:57:20 +0000 (+0200) Subject: Merge branch 'for-4.1/core-noarch' into for-linus X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bcf5d545890e9f7414341c572337ce58cba00a32;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'for-4.1/core-noarch' into for-linus --- bcf5d545890e9f7414341c572337ce58cba00a32 diff --cc kernel/livepatch/core.c index 3f9f1d6b4c2e,d03d6134e824..284e2691e380 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@@ -327,24 -314,20 +327,20 @@@ static void notrace klp_ftrace_handler( rcu_read_lock(); func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, stack_node); - rcu_read_unlock(); - if (WARN_ON_ONCE(!func)) - return; + goto unlock; klp_arch_set_pc(regs, (unsigned long)func->new_func); +unlock: + rcu_read_unlock(); } - static int klp_disable_func(struct klp_func *func) + static void klp_disable_func(struct klp_func *func) { struct klp_ops *ops; - int ret; - - if (WARN_ON(func->state != KLP_ENABLED)) - return -EINVAL; - if (WARN_ON(!func->old_addr)) - return -EINVAL; + WARN_ON(func->state != KLP_ENABLED); + WARN_ON(!func->old_addr); ops = klp_find_ops(func->old_addr); if (WARN_ON(!ops))