[PATCH] staging: unisys: drop format string in kthread_run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Calling kthread_run with a single name parameter causes it to be handled
as a format string. Since the uisthread interface lacks format parameters,
use "%s" to avoid any potential accidents from callers passing in dynamic
string content.

Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
---
 drivers/staging/unisys/uislib/uisthread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index d3c973b617ee..4c53eaff3c37 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/drivers/staging/unisys/uislib/uisthread.c
@@ -40,7 +40,7 @@ uisthread_start(struct uisthread_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 0;	/* failure */
-- 
1.9.1


-- 
Kees Cook
Chrome OS Security
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux