jump_label,module: Fix module lifetime for __jump_label_mod_text_reserved()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 18 Aug 2020 13:57:39 +0000 (15:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 1 Sep 2020 07:58:04 +0000 (09:58 +0200)
commit0db6e3734b130207026df1e78455fa98ca1d6f50
treec00e5bd613f2825d75dee5199b40aae30c4b0e73
parent59cc8e0a906ea23190922e5e0252e5b5a60d70c2
jump_label,module: Fix module lifetime for __jump_label_mod_text_reserved()

Nothing ensures the module exists while we're iterating
mod->jump_entries in __jump_label_mod_text_reserved(), take a module
reference to ensure the module sticks around.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20200818135804.504501338@infradead.org
kernel/jump_label.c