linux-stable/drivers/soundwire
Pierre-Louis Bossart 002364b2d5 soundwire: cadence: fix invalid PDI offset
[ Upstream commit 8ee1b439b1 ]

For some reason, we add an offset to the PDI, presumably to skip the
PDI0 and PDI1 which are reserved for BPT.

This code is however completely wrong and leads to an out-of-bounds
access. We were just lucky so far since we used only a couple of PDIs
and remained within the PDI array bounds.

A Fixes: tag is not provided since there are no known platforms where
the out-of-bounds would be accessed, and the initial code had problems
as well.

A follow-up patch completely removes this useless offset.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240326090122.1051806-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:28:41 +02:00
..
Kconfig
Makefile
bus.c soundwire: bus: Fix device found flag correctly 2021-05-14 09:44:19 +02:00
bus.h
bus_type.c soundwire: bus_type: fix remove and shutdown support 2022-08-25 11:17:54 +02:00
cadence_master.c soundwire: cadence: fix invalid PDI offset 2024-06-16 13:28:41 +02:00
cadence_master.h soundwire: cadence_master: improve PDI allocation 2024-06-16 13:28:41 +02:00
debugfs.c
intel.c soundwire: cadence_master: improve PDI allocation 2024-06-16 13:28:41 +02:00
intel.h
intel_init.c
mipi_disco.c
slave.c
stream.c soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:41:24 +01:00