Patch "drm/amd/display: fix a NULL pointer dereference in amdgpu_dm_i2c_xfer()" has been added to the 6.1-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/amd/display: fix a NULL pointer dereference in amdgpu_dm_i2c_xfer()

to the 6.1-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-amd-display-fix-a-null-pointer-dereference-in-amdgpu_dm_i2c_xfer.patch
and it can be found in the queue-6.1 subdirectory.

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


>From b71f4ade1b8900d30c661d6c27f87c35214c398c Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@xxxxxxx>
Date: Wed, 8 Nov 2023 13:31:57 -0600
Subject: drm/amd/display: fix a NULL pointer dereference in amdgpu_dm_i2c_xfer()

From: Mario Limonciello <mario.limonciello@xxxxxxx>

commit b71f4ade1b8900d30c661d6c27f87c35214c398c upstream.

When ddc_service_construct() is called, it explicitly checks both the
link type and whether there is something on the link which will
dictate whether the pin is marked as hw_supported.

If the pin isn't set or the link is not set (such as from
unloading/reloading amdgpu in an IGT test) then fail the
amdgpu_dm_i2c_xfer() call.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 22676bc500c2 ("drm/amd/display: Fix dmub soft hang for PSR 1")
Link: https://github.com/fwupd/fwupd/issues/6327
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7219,6 +7219,9 @@ static int amdgpu_dm_i2c_xfer(struct i2c
 	int i;
 	int result = -EIO;
 
+	if (!ddc_service->ddc_pin || !ddc_service->ddc_pin->hw_info.hw_supported)
+		return result;
+
 	cmd.payloads = kcalloc(num, sizeof(struct i2c_payload), GFP_KERNEL);
 
 	if (!cmd.payloads)


Patches currently in stable-queue which might be from mario.limonciello@xxxxxxx are

queue-6.1/xhci-enable-rpm-on-controllers-that-support-low-power-states.patch
queue-6.1/drm-amd-update-update_pcie_parameters-functions-to-u.patch
queue-6.1/drm-amd-display-enable-dsc_clk-even-if-dsc_pg-disabl.patch
queue-6.1/pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
queue-6.1/drm-amd-display-change-the-dmcub-mailbox-memory-location-from-fb-to-inbox.patch
queue-6.1/drm-amd-fix-ubsan-array-index-out-of-bounds-for-smu7.patch
queue-6.1/drm-amdgpu-don-t-use-pci_is_thunderbolt_attached.patch
queue-6.1/drm-amd-display-fix-a-null-pointer-dereference-in-amdgpu_dm_i2c_xfer.patch
queue-6.1/drm-amdgpu-don-t-use-atrm-for-external-devices.patch
queue-6.1/drm-amd-display-enable-fast-plane-updates-on-dcn3.2-and-above.patch
queue-6.1/drm-amd-fix-ubsan-array-index-out-of-bounds-for-pola.patch



[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