Skip to contentSkip to conversation

staging: unisys: avoid format string parsing

PATCH New Kees Cook 1 participant 1 message Jul 24, 2015 Staging

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 staging: unisys: avoid format string parsing

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

---
 drivers/staging/unisys/visornic/visornic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/unisys/visornic/visornic_main.c +1 -1
index 710074437737..9af4ed8d6f10 100644
@@ -296,7 +296,7 @@ static int visor_thread_start(struct visor_thread_info *thrinfo,
 {
 	/* used to stop the thread */
 	init_completion(&thrinfo->has_stopped);
-	thrinfo->task = kthread_run(threadfn, thrcontext, name);
+	thrinfo->task = kthread_run(threadfn, thrcontext, "%s", name);
 	if (IS_ERR(thrinfo->task)) {
 		thrinfo->id = 0;
 		return -EINVAL;
Signature · 6 lines
1.9.1


-- 
Kees Cook
Chrome OS Security