drm/amdgpu: Bound GPIO I2C table entry count from VBIOS
authorCandice Li <candice.li@amd.com>
Wed, 13 May 2026 04:31:57 +0000 (12:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:52:03 +0000 (11:52 -0400)
commita99cd231cd924b7160fecb9fb3a94b801522323b
tree0079024ff493c7dbed6773aa9c1688c435bfa67e
parent27ef1795bc4e47cae838e0a3ced531c549f9b23d
drm/amdgpu: Bound GPIO I2C table entry count from VBIOS

Reject undersized tables and cap the derived entry count
to AMDGPU_MAX_I2C_BUS so we do not overrun adev->i2c_bus[]
or walk an absurd number of entries on corrupt size fields.

Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c