android_kernel_xiaomi_sm8450/drivers/soundwire
Pierre-Louis Bossart fd4bcb991e soundwire: cadence: fix invalid PDI offset
[ Upstream commit 8ee1b439b1540ae543149b15a2a61b9dff937d91 ]

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:32:16 +02:00
..
bus_type.c soundwire: bus_type: fix remove and shutdown support 2022-08-21 15:15:56 +02:00
bus.c soundwire: fix enumeration completion 2023-08-11 11:57:55 +02:00
bus.h soundwire: bus: add enumerated Slave device to device list 2020-09-28 11:17:40 +05:30
cadence_master.c soundwire: cadence: fix invalid PDI offset 2024-06-16 13:32:16 +02:00
cadence_master.h soundwire: cadence: Remove wasted space in response_buf 2023-03-11 16:40:18 +01:00
debugfs.c soundwire: debugfs: use controller id and link_id for debugfs 2021-11-18 14:04:16 +01:00
generic_bandwidth_allocation.c soundwire: remove an unnecessary NULL check 2020-09-23 15:34:48 +05:30
intel_init.c soundwire: intel: fix possible crash when no device is detected 2021-03-04 11:38:22 +01:00
intel.c ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire 2023-01-14 10:16:28 +01:00
intel.h soundwire: intel: pass link_mask information to each master 2020-09-03 16:14:39 +05:30
Kconfig soundwire: Add generic bandwidth allocation algorithm 2020-09-18 17:48:51 +05:30
Makefile soundwire: Add generic bandwidth allocation algorithm 2020-09-18 17:48:51 +05:30
master.c soundwire: master: use pm_runtime_set_active() on add 2020-12-30 11:53:28 +01:00
mipi_disco.c soundwire: fix port_ready[] dynamic allocation in mipi_disco 2020-09-03 16:02:29 +05:30
qcom.c ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire 2023-01-14 10:16:28 +01:00
slave.c soundwire: sysfs: add slave status and device number before probe 2020-09-28 11:17:43 +05:30
stream.c soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:44:36 +01:00
sysfs_local.h soundwire: sysfs: add slave status and device number before probe 2020-09-28 11:17:43 +05:30
sysfs_slave_dpn.c soundwire: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute 2020-12-30 11:53:20 +01:00
sysfs_slave.c soundwire: sysfs: add slave status and device number before probe 2020-09-28 11:17:43 +05:30