Commit bda19b9b authored by Alex Deucher's avatar Alex Deucher Committed by Wen Zhiwei
Browse files

drm/amdgpu/atomfirmware: Silence UBSAN warning

stable inclusion
from stable-v6.6.52
commit 54268468399e5d1b23e76e43d06ff49ccad5fd4d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAYXOD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=54268468399e5d1b23e76e43d06ff49ccad5fd4d

--------------------------------

commit 17ea4383649fdeaff3181ddcf1ff03350d42e591 upstream.

Per the comments, these are variable sized arrays.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613


Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 81f7804ba84ee617ed594de934ed87bcc4f83531)
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 212e88fe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1006,7 +1006,7 @@ struct display_object_info_table_v1_4
  uint16_t  supporteddevices;
  uint8_t   number_of_path;
  uint8_t   reserved;
  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
  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
};

struct display_object_info_table_v1_5 {
@@ -1016,7 +1016,7 @@ struct display_object_info_table_v1_5 {
	uint8_t reserved;
	// 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
	struct atom_display_object_path_v3 display_path[8];
	struct atom_display_object_path_v3 display_path[];
};

/*