Merge branch 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm into...
[deliverable/linux.git] / kernel / jump_label.c
index f19aa02a8f48d5eca636ea906446fda5e0e6aee2..93ad6c1fb9b6212e706eb3ae08f7b881192008ec 100644 (file)
@@ -288,6 +288,9 @@ void __init jump_label_init(void)
        BUILD_BUG_ON((int)ATOMIC_INIT(0) != 0);
        BUILD_BUG_ON((int)ATOMIC_INIT(1) != 1);
 
+       if (static_key_initialized)
+               return;
+
        jump_label_lock();
        jump_label_sort_entries(iter_start, iter_stop);
 
@@ -337,11 +340,14 @@ static int __jump_label_mod_text_reserved(void *start, void *end)
 {
        struct module *mod;
 
+       preempt_disable();
        mod = __module_text_address((unsigned long)start);
+       WARN_ON_ONCE(__module_text_address((unsigned long)end) != mod);
+       preempt_enable();
+
        if (!mod)
                return 0;
 
-       WARN_ON_ONCE(__module_text_address((unsigned long)end) != mod);
 
        return __jump_label_text_reserved(mod->jump_entries,
                                mod->jump_entries + mod->num_jump_entries,
This page took 0.035665 seconds and 5 git commands to generate.