linux/drivers/thunderbolt
Xu Rao d2ee4d47aa thunderbolt: Fix bandwidth group reservation indexing
Valid bandwidth group IDs range from 1 through MAX_GROUPS, while Group
ID 0 is reserved. tb_consumed_dp_bandwidth() uses the Group ID directly
to index its local group_reserved[] array.

The array currently has MAX_GROUPS entries, so its valid indices are 0
through MAX_GROUPS - 1. Group ID MAX_GROUPS therefore accesses one
element past the end, and the final group's reserved bandwidth is not
included when the array is summed.

Give group_reserved[] MAX_GROUPS + 1 entries so direct Group ID
indexing covers the reserved ID 0 and valid IDs 1 through MAX_GROUPS.

Fixes: 52a4490e89 ("thunderbolt: Reserve released DisplayPort bandwidth for a group for 10 seconds")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Rao <raoxu@uniontech.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
History 2026-07-27 11:58:54 +02:00
..
acpi.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
cap.c thunderbolt: Update cap.c function documentation 2025-09-17 07:32:58 +02:00
clx.c thunderbolt: Update clx.c function documentation 2025-09-17 07:32:58 +02:00
configfs.c thunderbolt: Add support for ConfigFS 2026-05-19 14:20:18 +02:00
ctl.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
ctl.h thunderbolt: Add missing documentation in ctl.h tb_cfg_request struct 2025-09-17 07:32:58 +02:00
debugfs.c thunderbolt: debugfs: Fix sideband write size check 2026-06-08 12:47:28 +02:00
dma_port.c thunderbolt: dma_port: kmalloc_array + kzalloc to flex 2026-03-18 14:31:56 +01:00
dma_port.h thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
dma_test.c thunderbolt / net: Let the service drivers configure interrupt throttling 2026-05-19 14:20:18 +02:00
domain.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
eeprom.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
icm.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
Kconfig thunderbolt: Add support for USB4STREAM 2026-05-19 14:20:18 +02:00
lc.c thunderbolt: Fix typos in lc.c 2025-11-17 08:24:23 +01:00
Makefile thunderbolt: Separate out common NHI bits 2026-05-21 14:29:05 +02:00
nhi.c thunderbolt: Add some more descriptive probe error messages 2026-05-21 14:29:05 +02:00
nhi.h thunderbolt: Separate out common NHI bits 2026-05-21 14:29:05 +02:00
nhi_regs.h thunderbolt / net: Let the service drivers configure interrupt throttling 2026-05-19 14:20:18 +02:00
nvm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
path.c thunderbolt: Activate path hops from source to destination 2026-05-20 11:54:34 +02:00
pci.c thunderbolt: Separate out common NHI bits 2026-05-21 14:29:05 +02:00
property.c USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00
quirks.c thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware 2026-03-02 07:51:58 +01:00
retimer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sb_regs.h thunderbolt: debugfs: Implement asymmetric lane margining 2024-11-01 07:55:38 +02:00
stream.c thunderbolt: stream: Unmap buffers with mapped size 2026-07-27 11:58:54 +02:00
switch.c thunderbolt: Require nhi->ops be valid 2026-05-21 14:29:05 +02:00
tb.c thunderbolt: Fix bandwidth group reservation indexing 2026-07-27 11:58:54 +02:00
tb.h thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
tb_msgs.h thunderbolt: Notify userspace about firmware CM tunneling events 2025-04-24 08:24:39 +03:00
tb_regs.h thunderbolt: Increase Notification Timeout to 255 ms for USB4 routers 2026-05-20 11:54:35 +02:00
test.c thunderbolt: test: Release third DP tunnel 2026-06-01 12:37:32 +02:00
tmu.c thunderbolt: Fix typos in tmu.c 2025-11-17 08:24:24 +01:00
trace.h thunderbolt: Correct trace output of firmware connection manager packets 2024-04-29 07:47:54 +03:00
tunnel.c thunderbolt: Verify PCIe adapter in detect state before tunnel setup 2026-05-20 11:54:34 +02:00
tunnel.h thunderbolt: tunnel: Simplify allocation 2026-04-07 09:00:26 +02:00
usb4.c thunderbolt: Increase timeout for Configuration Ready bit 2026-05-20 11:54:34 +02:00
usb4_port.c thunderbolt: Move pci_device out of tb_nhi 2026-05-21 14:29:05 +02:00
xdomain.c USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00