From: Kees Cook <[email protected]>

This makes sure the kthread name can't be parsed as a format string.

Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
---
 drivers/staging/unisys/visornic/visornic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c 
b/drivers/staging/unisys/visornic/visornic_main.c
index a4ee194..18b0465 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -317,7 +317,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));
-- 
2.1.4

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to