diff --git a/[refs] b/[refs] index f4a37fb0cca0..7e57d730101d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0a80fb10239b04c45e5e80aad8d4b2ca5ac407b2 +refs/heads/master: 7d1d16e416e61aeef8655d542f8e4a4fc6e808e4 diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index fd1411403558..07c80e68a6c4 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -909,16 +909,18 @@ void __symbol_put(const char *symbol) } EXPORT_SYMBOL(__symbol_put); +/* Note this assumes addr is a function, which it currently always is. */ void symbol_put_addr(void *addr) { struct module *modaddr; + unsigned long a = (unsigned long)dereference_function_descriptor(addr); - if (core_kernel_text((unsigned long)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. */ - modaddr = __module_text_address((unsigned long)addr); + modaddr = __module_text_address(a); BUG_ON(!modaddr); module_put(modaddr); }