]> git.itanic.dy.fi Git - linux-stable/commit
drm/radeon: make -fstrict-flex-arrays=3 happy
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Apr 2024 02:06:08 +0000 (22:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Apr 2024 15:50:43 +0000 (11:50 -0400)
commit0ba753bc7e79e49556e81b0d09b2de1aa558553b
tree14ca29432841e2af2b4ebdd6e3e700c427cb8af8
parenta6ff969fe9cbf369e3cd0ac54261fec1122682ec
drm/radeon: make -fstrict-flex-arrays=3 happy

The driver parses a union where the layout up through the first
array is the same, however, the array has different sizes
depending on the elements in the union.  Be explicit to
fix the UBSAN checker.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3323
Fixes: df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3")
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Kees Cook <keescook@chromium.org>
drivers/gpu/drm/radeon/radeon_atombios.c