summaryrefslogtreecommitdiff
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2007-05-08 00:28:38 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 11:15:08 -0700
commitae84e324709d6320ed8c1fd7b1736fcbaf26df95 (patch)
treebb3b623f2fd491771c716957622a72e86e9582dd /kernel/kallsyms.c
parent55955aad7c09e4d93029d0cf2d360b41891f2fe4 (diff)
Simplify module_get_kallsym() by dropping length arg
module_get_kallsym() could in theory truncate module symbol name to fit in buffer, but nobody does this. Always use KSYM_NAME_LEN + 1 bytes for name. Suggested by lg^WRusty. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r--kernel/kallsyms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 5a0de8409739..d086c91d44ed 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -312,7 +312,7 @@ static int get_ksymbol_mod(struct kallsym_iter *iter)
{
iter->owner = module_get_kallsym(iter->pos - kallsyms_num_syms,
&iter->value, &iter->type,
- iter->name, sizeof(iter->name));
+ iter->name);
if (iter->owner == NULL)
return 0;