diff options
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index 71a0944bddb1..858b34f4c33b 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2128,7 +2128,7 @@ const struct exception_table_entry *search_module_extables(unsigned long addr) } /* Is this a valid kernel address? We don't grab the lock: we are oopsing. */ -struct module *module_text_address(unsigned long addr) +struct module *__module_text_address(unsigned long addr) { struct module *mod; @@ -2139,6 +2139,18 @@ struct module *module_text_address(unsigned long addr) return NULL; } +struct module *module_text_address(unsigned long addr) +{ + struct module *mod; + unsigned long flags; + + spin_lock_irqsave(&modlist_lock, flags); + mod = __module_text_address(addr); + spin_unlock_irqrestore(&modlist_lock, flags); + + return mod; +} + /* Don't grab lock, we're oopsing. */ void print_modules(void) { |
