summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEugene Loh2019-01-17 23:46:00 +0100
committerGreg Kroah-Hartman2019-03-23 20:09:47 +0100
commitcacf3c0d82889b7628e98952bf1207aff398389a (patch)
treed1237f7f304cba182330c5769c119028f8d11ff0 /scripts
parentclk: sunxi-ng: v3s: Fix TCON reset de-assert bit (diff)
downloadkernel-qcow2-linux-cacf3c0d82889b7628e98952bf1207aff398389a.tar.gz
kernel-qcow2-linux-cacf3c0d82889b7628e98952bf1207aff398389a.tar.xz
kernel-qcow2-linux-cacf3c0d82889b7628e98952bf1207aff398389a.zip
kallsyms: Handle too long symbols in kallsyms.c
[ Upstream commit 6db2983cd8064808141ccefd75218f5b4345ffae ] 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 <eugene.loh@oracle.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index a9186a98a37d..0c9c54b57515 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -120,8 +120,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;