Skip to content

Commit 5426846

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/atomfirmware: Silence UBSAN warning
commit 17ea438 upstream. Per the comments, these are variable sized arrays. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613 Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 81f7804) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent def80cd commit 5426846

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/include/atomfirmware.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ struct display_object_info_table_v1_4
10061006
uint16_t supporteddevices;
10071007
uint8_t number_of_path;
10081008
uint8_t reserved;
1009-
struct atom_display_object_path_v2 display_path[8]; //the real number of this included in the structure is calculated by using the (whole structure size - the header size- number_of_path)/size of atom_display_object_path
1009+
struct atom_display_object_path_v2 display_path[]; //the real number of this included in the structure is calculated by using the (whole structure size - the header size- number_of_path)/size of atom_display_object_path
10101010
};
10111011

10121012
struct display_object_info_table_v1_5 {
@@ -1016,7 +1016,7 @@ struct display_object_info_table_v1_5 {
10161016
uint8_t reserved;
10171017
// the real number of this included in the structure is calculated by using the
10181018
// (whole structure size - the header size- number_of_path)/size of atom_display_object_path
1019-
struct atom_display_object_path_v3 display_path[8];
1019+
struct atom_display_object_path_v3 display_path[];
10201020
};
10211021

10221022
/*

0 commit comments

Comments
 (0)