3.16.66-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Eugene Loh <[email protected]>

commit 6db2983cd8064808141ccefd75218f5b4345ffae upstream.

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 <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <[email protected]>
---
 scripts/kallsyms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -121,8 +121,8 @@ static int read_symbol(FILE *in, struct
                        fprintf(stderr, "Read error or end of file.\n");
                return -1;
        }
-       if (strlen(str) > KSYM_NAME_LEN) {
-               fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"
+       if (strlen(str) >= 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",
                        str, strlen(str), KSYM_NAME_LEN);
                return -1;

Reply via email to