diff mbox

ASoC: Intel: avoid format string leak to thread name

Message ID 20140522184355.GA8301@www.outflux.net (mailing list archive)
State Accepted
Commit 35386320898ec01f922929877a723fe1d4ddf04b
Headers show

Commit Message

Kees Cook May 22, 2014, 6:43 p.m. UTC
This makes sure a format string can never get processed into the worker
thread name from the device name.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 sound/soc/intel/sst-baytrail-ipc.c |    2 +-
 sound/soc/intel/sst-haswell-ipc.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown May 26, 2014, 1:31 p.m. UTC | #1
On Thu, May 22, 2014 at 11:43:55AM -0700, Kees Cook wrote:
> This makes sure a format string can never get processed into the worker
> thread name from the device name.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/intel/sst-baytrail-ipc.c b/sound/soc/intel/sst-baytrail-ipc.c
index 0d31dbbf4806..1b25bf168beb 100644
--- a/sound/soc/intel/sst-baytrail-ipc.c
+++ b/sound/soc/intel/sst-baytrail-ipc.c
@@ -809,7 +809,7 @@  int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)
 	/* start the IPC message thread */
 	init_kthread_worker(&byt->kworker);
 	byt->tx_thread = kthread_run(kthread_worker_fn,
-				     &byt->kworker,
+				     &byt->kworker, "%s",
 				     dev_name(byt->dev));
 	if (IS_ERR(byt->tx_thread)) {
 		err = PTR_ERR(byt->tx_thread);
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
index e7996b39a484..a8fd60c67341 100644
--- a/sound/soc/intel/sst-haswell-ipc.c
+++ b/sound/soc/intel/sst-haswell-ipc.c
@@ -1735,7 +1735,7 @@  int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata)
 	/* start the IPC message thread */
 	init_kthread_worker(&hsw->kworker);
 	hsw->tx_thread = kthread_run(kthread_worker_fn,
-					   &hsw->kworker,
+					   &hsw->kworker, "%s",
 					   dev_name(hsw->dev));
 	if (IS_ERR(hsw->tx_thread)) {
 		ret = PTR_ERR(hsw->tx_thread);