]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: SOF: Don't allow pointer operations on unconfigured streams
authorMark Brown <broonie@kernel.org>
Thu, 26 Mar 2026 14:52:41 +0000 (14:52 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 10 Apr 2026 12:57:09 +0000 (13:57 +0100)
commitc5b6285aae050ff1c3ea824ca3d88ac4be1e69c8
tree2096079844f7231276f9281036002352376d9f4b
parent2603ea46ce5c59568cf968ce35d2bf2854042182
ASoC: SOF: Don't allow pointer operations on unconfigured streams

When reporting the pointer for a compressed stream we report the current
I/O frame position by dividing the position by the number of channels
multiplied by the number of container bytes. These values default to 0 and
are only configured as part of setting the stream parameters so this allows
a divide by zero to be configured. Validate that they are non zero,
returning an error if not

Fixes: c1a731c71359 ("ASoC: SOF: compress: Add support for computing timestamps")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260326-asoc-compress-tstamp-params-v1-1-3dc735b3d599@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/compress.c