drm/amdgpu: Fix FRU data checking
authorKent Russell <kent.russell@amd.com>
Tue, 24 Mar 2020 09:29:46 +0000 (05:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Apr 2020 18:44:42 +0000 (14:44 -0400)
commit714309f0f3e32a52beca44460986caf8d9e143f3
tree47a84810446c11f40d861fda42a0343204db24da
parent358e00e0adc8622f2acd6bf70704e7a86df2b568
drm/amdgpu: Fix FRU data checking

Ensure that when we memcpy, we don't end up copying more data than
the struct supports. For now, this is 16 characters for product number
and serial number, and 32 chars for product name

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c