|
@@ -1828,8 +1828,9 @@ static struct module *load_module(void __user *umod,
|
|
|
unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME);
|
|
|
#endif
|
|
|
|
|
|
- /* Don't keep modinfo section */
|
|
|
+ /* Don't keep modinfo and version sections. */
|
|
|
sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
|
|
|
+ sechdrs[versindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
|
|
|
#ifdef CONFIG_KALLSYMS
|
|
|
/* Keep symbol and string tables for decoding later. */
|
|
|
sechdrs[symindex].sh_flags |= SHF_ALLOC;
|