ASoC: Intel: avoid format string leak to thread name
authorKees Cook <keescook@chromium.org>
Thu, 22 May 2014 18:43:55 +0000 (11:43 -0700)
committerMark Brown <broonie@linaro.org>
Mon, 26 May 2014 13:31:04 +0000 (14:31 +0100)
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>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/intel/sst-baytrail-ipc.c
sound/soc/intel/sst-haswell-ipc.c

index 7c1ec003d55d21cf0a918300264c8a769252708c..18273d26718a9808d1d3eae214290bdd0086c0cf 100644 (file)
@@ -892,7 +892,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);
index e7996b39a48480a8577ac26d6cad28e3392259aa..a8fd60c6734197c9868bb1be9d690781db8f9fd7 100644 (file)
@@ -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);