diff options
| author | 2015-12-02 09:33:25 -0800 | |
|---|---|---|
| committer | 2015-12-02 09:33:25 -0800 | |
| commit | 0eea505058740aa45486145296ef4fefbd8cab85 (patch) | |
| tree | 1bc265d615b8353405a04630f610a42c48302f47 /kernel/module.c | |
| parent | Input: parkbd - drop bogus __init from parkbd_allocate_serio() (diff) | |
| parent | Linux 4.4-rc3 (diff) | |
Merge tag 'v4.4-rc3' into next
Merge with Linux 4.4-rc3 to bring in helpers for multiu-driver modules.
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index b86b7bf1be38..8f051a106676 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1063,11 +1063,15 @@ void symbol_put_addr(void *addr) if (core_kernel_text(a)) return; - /* module_text_address is safe here: we're supposed to have reference - * to module from symbol_get, so it can't go away. */ + /* + * Even though we hold a reference on the module; we still need to + * disable preemption in order to safely traverse the data structure. + */ + preempt_disable(); modaddr = __module_text_address(a); BUG_ON(!modaddr); module_put(modaddr); + preempt_enable(); } EXPORT_SYMBOL_GPL(symbol_put_addr); |
