Merge branch 'for-4.1/core-noarch' into for-linus
authorJiri Kosina <jkosina@suse.cz>
Mon, 13 Apr 2015 21:57:20 +0000 (23:57 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 13 Apr 2015 21:57:20 +0000 (23:57 +0200)
1  2 
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))