]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/module.c
printk: use mutex lock to stop syslog_seq from going wild
[karo-tx-linux.git] / kernel / module.c
index 78ac6ec1e425f8dc03fe27eccd9beee2a233d90a..4edbd9c11aca35a71e56bc237ef638d596a7db23 100644 (file)
@@ -2429,7 +2429,8 @@ static int copy_and_check(struct load_info *info,
                goto free_hdr;
        }
 
-       if (len < hdr->e_shoff + hdr->e_shnum * sizeof(Elf_Shdr)) {
+       if (hdr->e_shoff >= len ||
+           hdr->e_shnum * sizeof(Elf_Shdr) > len - hdr->e_shoff) {
                err = -ENOEXEC;
                goto free_hdr;
        }
@@ -2953,7 +2954,7 @@ static struct module *load_module(void __user *umod,
 
        /* Module is ready to execute: parsing args may do that. */
        err = parse_args(mod->name, mod->args, mod->kp, mod->num_kp,
-                        -32768, 32767, NULL);
+                        -32768, 32767, &ddebug_dyndbg_module_param_cb);
        if (err < 0)
                goto unlink;