Patch "drm/radeon: make -fstrict-flex-arrays=3 happy" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/radeon: make -fstrict-flex-arrays=3 happy

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-radeon-make-fstrict-flex-arrays-3-happy.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 80987753e51509771ef069b99ab80e3176fe894e
Author: Alex Deucher <alexander.deucher@xxxxxxx>
Date:   Sun Apr 14 22:06:08 2024 -0400

    drm/radeon: make -fstrict-flex-arrays=3 happy
    
    [ Upstream commit 0ba753bc7e79e49556e81b0d09b2de1aa558553b ]
    
    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@xxxxxxx>
    Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Cc: Kees Cook <keescook@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 85c4bb186203c..061396e7fa0f9 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -922,8 +922,12 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
 		max_device = ATOM_MAX_SUPPORTED_DEVICE_INFO;
 
 	for (i = 0; i < max_device; i++) {
-		ATOM_CONNECTOR_INFO_I2C ci =
-		    supported_devices->info.asConnInfo[i];
+		ATOM_CONNECTOR_INFO_I2C ci;
+
+		if (frev > 1)
+			ci = supported_devices->info_2d1.asConnInfo[i];
+		else
+			ci = supported_devices->info.asConnInfo[i];
 
 		bios_connectors[i].valid = false;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux