Commit 140fe3b1 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Steven Rostedt

jump_label: Fix jump_label update for modules

The jump labels entries for modules do not stop at __stop__jump_table,
but after mod->jump_entries + mod_num_jump_entries.

By checking the wrong end point, module trace events never get enabled.

Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: default avatarJason Baron <jbaron@redhat.com>
Tested-by: default avatarAvi Kivity <avi@redhat.com>
Tested-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Link: http://lkml.kernel.org/r/4E00038B.2060404@cn.fujitsu.comSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent debf1d49
...@@ -375,15 +375,19 @@ int jump_label_text_reserved(void *start, void *end) ...@@ -375,15 +375,19 @@ int jump_label_text_reserved(void *start, void *end)
static void jump_label_update(struct jump_label_key *key, int enable) static void jump_label_update(struct jump_label_key *key, int enable)
{ {
struct jump_entry *entry = key->entries; struct jump_entry *entry = key->entries, *stop = __stop___jump_table;
/* if there are no users, entry can be NULL */
if (entry)
__jump_label_update(key, entry, __stop___jump_table, enable);
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
struct module *mod = __module_address((jump_label_t)key);
__jump_label_mod_update(key, enable); __jump_label_mod_update(key, enable);
if (mod)
stop = mod->jump_entries + mod->num_jump_entries;
#endif #endif
/* if there are no users, entry can be NULL */
if (entry)
__jump_label_update(key, entry, stop, enable);
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment