diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/kprobes.h | 4 | ||||
-rw-r--r-- | include/linux/kallsyms.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index b0e40ff32ee..9537fda238b 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h @@ -65,10 +65,10 @@ typedef unsigned int kprobe_opcode_t; } else if (name[0] != '.') \ addr = *(kprobe_opcode_t **)addr; \ } else { \ - char dot_name[KSYM_NAME_LEN+1]; \ + char dot_name[KSYM_NAME_LEN]; \ dot_name[0] = '.'; \ dot_name[1] = '\0'; \ - strncat(dot_name, name, KSYM_NAME_LEN); \ + strncat(dot_name, name, KSYM_NAME_LEN - 2); \ addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \ } \ } diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 5f06527dca2..f73de6fb5c6 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -7,9 +7,9 @@ #include <linux/errno.h> -#define KSYM_NAME_LEN 127 -#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + KSYM_NAME_LEN + \ - 2*(BITS_PER_LONG*3/10) + MODULE_NAME_LEN + 1) +#define KSYM_NAME_LEN 128 +#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ + 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1) #ifdef CONFIG_KALLSYMS /* Lookup the address for a symbol. Returns 0 if not found. */ |