diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-04 15:14:38 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-04 15:14:38 +0200 |
commit | fb1b83d3ff78168e10799627f231cf0c05c9d80d (patch) | |
tree | 57feaa178322a776825329c3c7c170aee2ded837 /kernel/jump_label.c | |
parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
parent | extable.h: add stddef.h so "NULL" definition is not implicit (diff) | |
download | linux-fb1b83d3ff78168e10799627f231cf0c05c9d80d.tar.xz linux-fb1b83d3ff78168e10799627f231cf0c05c9d80d.zip |
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module updates from Rusty Russell:
"The only interesting thing here is Jessica's patch to add
ro_after_init support to modules. The rest are all trivia"
* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
extable.h: add stddef.h so "NULL" definition is not implicit
modules: add ro_after_init support
jump_label: disable preemption around __module_text_address().
exceptions: fork exception table content from module.h into extable.h
modules: Add kernel parameter to blacklist modules
module: Do a WARN_ON_ONCE() for assert module mutex not held
Documentation/module-signing.txt: Note need for version info if reusing a key
module: Invalidate signatures on force-loaded modules
module: Issue warnings when tainting kernel
module: fix redundant test.
module: fix noreturn attribute for __module_put_and_exit()
Diffstat (limited to 'kernel/jump_label.c')
-rw-r--r-- | kernel/jump_label.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c index f19aa02a8f48..20400055f177 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -337,11 +337,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, |