summaryrefslogtreecommitdiff
path: root/kernel/torture.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2014-05-22 11:51:04 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-07-07 10:12:56 -0700
commit6945915e7f949e213c525d4eb244be87ec92f3d1 (patch)
tree284e98cf0402cc53cfdae22c7719d4ed9a413779 /kernel/torture.c
parent9bee2c6fb49d93678e4fb506a911c0b5ffe455ee (diff)
torture: Avoid format string leak to thead name
Since the torture-test thread creation interface does not include format string arguments, this commit makes sure the name can never be accidentally processed as a format string. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/torture.c')
-rw-r--r--kernel/torture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/torture.c b/kernel/torture.c
index 40bb511cca48..d600af21f022 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -708,7 +708,7 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
int ret = 0;
VERBOSE_TOROUT_STRING(m);
- *tp = kthread_run(fn, arg, s);
+ *tp = kthread_run(fn, arg, "%s", s);
if (IS_ERR(*tp)) {
ret = PTR_ERR(*tp);
VERBOSE_TOROUT_ERRSTRING(f);