X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=kernel%2Fmodule.c;h=8f051a106676fb8f2d5457a9104340cce81ce37a;hb=0c63d80c3fac4e6eb0f01dff756e47bc7cd50092;hp=b86b7bf1be388d72fe92fb6038b4a67b4710df1f;hpb=12f03ee606914317e7e6a0815e53a48205c31dae;p=karo-tx-linux.git 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);