diff options
| author | Petr Mladek <pmladek@suse.com> | 2018-01-22 10:40:32 +0100 | 
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2018-01-22 10:40:32 +0100 | 
| commit | 3ccdc5190f8df12dfafff9264e406c5496401da5 (patch) | |
| tree | ca4afea86b2ae2625125658b2e0af2e043e84017 /arch/ia64/kernel/module.c | |
| parent | 6fd78a1a99c9580da49ee8f951fdce9846256375 (diff) | |
| parent | 1df7338ac96558d5ae4c1a9dd5d1cb60fcd1bdb2 (diff) | |
Merge branch 'for-4.16-deprecate-printk-pf' into for-4.16
Diffstat (limited to 'arch/ia64/kernel/module.c')
| -rw-r--r-- | arch/ia64/kernel/module.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index 853b5611a894..326448f9df16 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c @@ -36,6 +36,7 @@  #include <asm/patch.h>  #include <asm/unaligned.h> +#include <asm/sections.h>  #define ARCH_MODULE_DEBUG 0 @@ -918,3 +919,14 @@ module_arch_cleanup (struct module *mod)  	if (mod->arch.core_unw_table)  		unw_remove_unwind_table(mod->arch.core_unw_table);  } + +void *dereference_module_function_descriptor(struct module *mod, void *ptr) +{ +	Elf64_Shdr *opd = mod->arch.opd; + +	if (ptr < (void *)opd->sh_addr || +			ptr >= (void *)(opd->sh_addr + opd->sh_size)) +		return ptr; + +	return dereference_function_descriptor(ptr); +} | 
