diff options
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c index 539fed9ac83c..33c04ad51175 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2133,7 +2133,7 @@ int lookup_module_symbol_name(unsigned long addr, char *symname) | |||
2133 | sym = get_ksymbol(mod, addr, NULL, NULL); | 2133 | sym = get_ksymbol(mod, addr, NULL, NULL); |
2134 | if (!sym) | 2134 | if (!sym) |
2135 | goto out; | 2135 | goto out; |
2136 | strlcpy(symname, sym, KSYM_NAME_LEN + 1); | 2136 | strlcpy(symname, sym, KSYM_NAME_LEN); |
2137 | mutex_unlock(&module_mutex); | 2137 | mutex_unlock(&module_mutex); |
2138 | return 0; | 2138 | return 0; |
2139 | } | 2139 | } |
@@ -2158,9 +2158,9 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, | |||
2158 | if (!sym) | 2158 | if (!sym) |
2159 | goto out; | 2159 | goto out; |
2160 | if (modname) | 2160 | if (modname) |
2161 | strlcpy(modname, mod->name, MODULE_NAME_LEN + 1); | 2161 | strlcpy(modname, mod->name, MODULE_NAME_LEN); |
2162 | if (name) | 2162 | if (name) |
2163 | strlcpy(name, sym, KSYM_NAME_LEN + 1); | 2163 | strlcpy(name, sym, KSYM_NAME_LEN); |
2164 | mutex_unlock(&module_mutex); | 2164 | mutex_unlock(&module_mutex); |
2165 | return 0; | 2165 | return 0; |
2166 | } | 2166 | } |
@@ -2181,8 +2181,8 @@ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, | |||
2181 | *value = mod->symtab[symnum].st_value; | 2181 | *value = mod->symtab[symnum].st_value; |
2182 | *type = mod->symtab[symnum].st_info; | 2182 | *type = mod->symtab[symnum].st_info; |
2183 | strlcpy(name, mod->strtab + mod->symtab[symnum].st_name, | 2183 | strlcpy(name, mod->strtab + mod->symtab[symnum].st_name, |
2184 | KSYM_NAME_LEN + 1); | 2184 | KSYM_NAME_LEN); |
2185 | strlcpy(module_name, mod->name, MODULE_NAME_LEN + 1); | 2185 | strlcpy(module_name, mod->name, MODULE_NAME_LEN); |
2186 | *exported = is_exported(name, mod); | 2186 | *exported = is_exported(name, mod); |
2187 | mutex_unlock(&module_mutex); | 2187 | mutex_unlock(&module_mutex); |
2188 | return 0; | 2188 | return 0; |