path: root/scripts
diff options
authorEugene Loh <>2019-01-17 14:46:00 -0800
committerMasahiro Yamada <>2019-01-28 13:02:09 +0900
commit6db2983cd8064808141ccefd75218f5b4345ffae (patch)
tree478565dcc6988cb3208ba36d9626614f5adc763c /scripts
parentf17b5f06cb92ef2250513a1e154c47b78df07d40 (diff)
kallsyms: Handle too long symbols in kallsyms.c
When checking for symbols with excessively long names, account for null terminating character. Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c") Signed-off-by: Eugene Loh <> Acked-by: Ard Biesheuvel <> Signed-off-by: Masahiro Yamada <>
Diffstat (limited to 'scripts')
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 77cebad0474e..f75e7bda4889 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -118,8 +118,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
fprintf(stderr, "Read error or end of file.\n");
return -1;
- if (strlen(sym) > KSYM_NAME_LEN) {
- fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"
+ if (strlen(sym) >= KSYM_NAME_LEN) {
+ fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n"
"Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
sym, strlen(sym), KSYM_NAME_LEN);
return -1;