aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2006-02-24 04:06:36 -0500
committerAnton Altaparmakov <aia21@cantab.net>2006-02-24 04:06:36 -0500
commitfab8d6ddf6dee2608869005d45fe97f70e4f5bdd (patch)
treefecf566e03a87b2a44c7f3363ddb5c0d4bebdca7 /kernel/module.c
parent64419d93a5906600af5817ad0cae3c6ecf7fb389 (diff)
parentf52ee1410d563cd409b08822492273a5bc235821 (diff)
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 618ed6e23ecc..5aad477ddc79 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1670,6 +1670,9 @@ static struct module *load_module(void __user *umod,
1670 goto free_mod; 1670 goto free_mod;
1671 } 1671 }
1672 1672
1673 /* Userspace could have altered the string after the strlen_user() */
1674 args[arglen - 1] = '\0';
1675
1673 if (find_module(mod->name)) { 1676 if (find_module(mod->name)) {
1674 err = -EEXIST; 1677 err = -EEXIST;
1675 goto free_mod; 1678 goto free_mod;
@@ -2092,7 +2095,8 @@ static unsigned long mod_find_symname(struct module *mod, const char *name)
2092 unsigned int i; 2095 unsigned int i;
2093 2096
2094 for (i = 0; i < mod->num_symtab; i++) 2097 for (i = 0; i < mod->num_symtab; i++)
2095 if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0) 2098 if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0 &&
2099 mod->symtab[i].st_info != 'U')
2096 return mod->symtab[i].st_value; 2100 return mod->symtab[i].st_value;
2097 return 0; 2101 return 0;
2098} 2102}