ASoC: SOF: ipc4-mtrace: protect per-core nodes against multiple open
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Tue, 18 Oct 2022 12:13:32 +0000 (15:13 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 18 Oct 2022 20:17:21 +0000 (21:17 +0100)
commitaf6514f2f3828dc39c96cd4686ef5c9d8368626f
treee44593d492e3f66bce9ac8133054a7f6d5db7dfa
parentb4dd2e3758709aa8a2abd1ac34c56bd09b980039
ASoC: SOF: ipc4-mtrace: protect per-core nodes against multiple open

Add protection against multiple open of the mtrace/coreN debugfs
nodes. This is not supported in the implementation, and this will
show up as unexpected behaviour of the interface, and potential
use of already freed memory.

Fixes: f4ea22f7aa75 ("ASoC: SOF: ipc4: Add support for mtrace log extraction")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20221018121332.20802-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-mtrace.c