]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: unisys: avoid format string parsing
authorKees Cook <keescook@chromium.org>
Tue, 28 Jul 2015 16:29:06 +0000 (12:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2015 23:09:23 +0000 (16:09 -0700)
This makes sure the kthread name can't be parsed as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visornic/visornic_main.c

index 2a9b055dcc51abd40477fd2e04ed476b3a471b0b..f4c0c9fd077bbbd6b1edd1da6793b6f974983c07 100644 (file)
@@ -316,7 +316,7 @@ static int visor_thread_start(struct visor_thread_info *thrinfo,
                              void *thrcontext, char *name)
 {
        /* used to stop the thread */
-       thrinfo->task = kthread_run(threadfn, thrcontext, name);
+       thrinfo->task = kthread_run(threadfn, thrcontext, "%s", name);
        if (IS_ERR(thrinfo->task)) {
                pr_debug("%s failed (%ld)\n",
                         __func__, PTR_ERR(thrinfo->task));