sh: fix format string bug in stack tracer
authorMatt Fleming <matt.fleming@intel.com>
Thu, 3 Apr 2014 21:46:20 +0000 (14:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:49 +0000 (16:20 -0700)
commita0c32761e73c9999cbf592b702f284221fea8040
treeae4d499ba62c67522820f9c33c2e0a4878cde55a
parent59ecc26004e77e100c700b1d0da7502b0fdadb46
sh: fix format string bug in stack tracer

Kees reported the following error:

   arch/sh/kernel/dumpstack.c: In function 'print_trace_address':
   arch/sh/kernel/dumpstack.c:118:2: error: format not a string literal and no format arguments [-Werror=format-security]

Use the "%s" format so that it's impossible to interpret 'data' as a
format string.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Reported-by: Kees Cook <keescook@chromium.org>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/sh/kernel/dumpstack.c