staging: unisys: avoid format string parsing

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>
This commit is contained in:
Kees Cook 2015-07-28 12:29:06 -04:00 committed by Greg Kroah-Hartman
commit 30948df80c

View 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));