From 80d58535c94005b68410dbfd2220e447eb3a8b63 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 10 Jun 2011 13:33:24 -0700 Subject: [PATCH] dtrace: fix off-by-one reading relocation info. Reading the dtrace relocation info table could fail on a boundary condition. Fix by counting the string terminator (null) byte. Now works for my 4 test cases. Signed-off-by: Randy Dunlap --- kernel/dtrace/sdt_register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dtrace/sdt_register.c b/kernel/dtrace/sdt_register.c index 2a00c982491a..d91d19224989 100644 --- a/kernel/dtrace/sdt_register.c +++ b/kernel/dtrace/sdt_register.c @@ -107,7 +107,7 @@ void dtrace_register_builtins(void) __func__, ri->probe_name); nextri = (void *)ri + sizeof(struct reloc_info) - + roundup(ri->probe_name_len, BITS_PER_LONG / 8); + + roundup(ri->probe_name_len + 1, BITS_PER_LONG / 8); ri = nextri; DPRINTK("SDT relocs: next entry at 0x%p\n", ri); } -- 2.50.1