diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-07-26 17:10:41 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-29 15:36:32 +0300 |
commit | aebb1813c279ce8f3a2dfa3f86def0c0ec1cbb8d (patch) | |
tree | f2010ebe5e07e67d9ba10b8fb663583302dd8cb6 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) | |
download | linux-aebb1813c279ce8f3a2dfa3f86def0c0ec1cbb8d.tar.xz |
ASoC: codecs: wcd937x-sdw: Correct Soundwire ports mask
Device has up to WCD937X_MAX_TX_SWR_PORTS (or WCD937X_MAX_SWR_PORTS
for sink) number of ports and the array assigned to prop.src_dpn_prop
and prop.sink_dpn_prop has 0..WCD937X_MAX_TX_SWR_PORTS-1 elements. On
the other hand, GENMASK(high, low) creates an inclusive mask between
<high, low>, so we need the mask from 0 up to WCD937X_MAX_TX_SWR_PORTS-1.
Theoretically, too wide mask could cause an out of bounds read in
sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy
driver, e.g. adding incorrect number of ports via
sdw_stream_add_slave().
Fixes: c99a515ff153 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-1-d4d7a8b56f05@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions