summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAndrey Misiurov <amisiurov@cloudlinux.com>2026-11-09 16:52:15 +0100
committerAlex Deucher <alexander.deucher@amd.com>2026-11-18 01:44:25 -0500
commit7345797c8652c976d18dc4be4bae632557c3bc38 (patch)
tree6f80d0d96c446449b085c71ba0a4a37c3d432946 /tools/perf/scripts/python
parent8c417209754a9d2cd8dc1e78c0dfadefd0ad0e82 (diff)
drm/radeon: Bound GPIO I2C table entry count from VBIOS
radeon_atombios_i2c_init() derives the number of GPIO I2C entries from the size field of the VBIOS GPIO_I2C_Info table and stores a bus for every valid entry in rdev->i2c_bus[i], which has RADEON_MAX_I2C_BUS (16) slots. A table that claims more than 16 entries makes it write past the end of the array into the rest of struct radeon_device. A size smaller than the common header wraps the subtraction and the loop walks far past the table. radeon_lookup_i2c_gpio() uses the same calculation. Reject undersized tables and cap the entry count at RADEON_MAX_I2C_BUS. Fixes: f376b94fbc0a ("drm/radeon/kms: unify i2c handling") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Andrey Misiurov <amisiurov@cloudlinux.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ad5ddb2f77ff5e80b3c793f062dc1cad9907a2b9) Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions