aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/jump_label.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/jump_label.c')
-rw-r--r--kernel/jump_label.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index fa27e750dbc0..a8ce45097f3d 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -375,15 +375,19 @@ int jump_label_text_reserved(void *start, void *end)
375 375
376static void jump_label_update(struct jump_label_key *key, int enable) 376static void jump_label_update(struct jump_label_key *key, int enable)
377{ 377{
378 struct jump_entry *entry = key->entries; 378 struct jump_entry *entry = key->entries, *stop = __stop___jump_table;
379
380 /* if there are no users, entry can be NULL */
381 if (entry)
382 __jump_label_update(key, entry, __stop___jump_table, enable);
383 379
384#ifdef CONFIG_MODULES 380#ifdef CONFIG_MODULES
381 struct module *mod = __module_address((jump_label_t)key);
382
385 __jump_label_mod_update(key, enable); 383 __jump_label_mod_update(key, enable);
384
385 if (mod)
386 stop = mod->jump_entries + mod->num_jump_entries;
386#endif 387#endif
388 /* if there are no users, entry can be NULL */
389 if (entry)
390 __jump_label_update(key, entry, stop, enable);
387} 391}
388 392
389#endif 393#endif