diff options
-rw-r--r-- | arch/s390/kernel/module.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index 7873e171457c..fbc07891f9e7 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c | |||
@@ -51,6 +51,10 @@ void *module_alloc(unsigned long size) | |||
51 | 51 | ||
52 | void module_arch_freeing_init(struct module *mod) | 52 | void module_arch_freeing_init(struct module *mod) |
53 | { | 53 | { |
54 | if (is_livepatch_module(mod) && | ||
55 | mod->state == MODULE_STATE_LIVE) | ||
56 | return; | ||
57 | |||
54 | vfree(mod->arch.syminfo); | 58 | vfree(mod->arch.syminfo); |
55 | mod->arch.syminfo = NULL; | 59 | mod->arch.syminfo = NULL; |
56 | } | 60 | } |
@@ -425,7 +429,5 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
425 | struct module *me) | 429 | struct module *me) |
426 | { | 430 | { |
427 | jump_label_apply_nops(me); | 431 | jump_label_apply_nops(me); |
428 | vfree(me->arch.syminfo); | ||
429 | me->arch.syminfo = NULL; | ||
430 | return 0; | 432 | return 0; |
431 | } | 433 | } |