Browse Source

ASoC: Intel: avoid format string leak to thread name

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>
Kees Cook 11 năm trước cách đây
mục cha
commit
3538632089
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      sound/soc/intel/sst-baytrail-ipc.c
  2. 1 1
      sound/soc/intel/sst-haswell-ipc.c

+ 1 - 1
sound/soc/intel/sst-baytrail-ipc.c

@@ -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);

+ 1 - 1
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);