Patch "drm/amd/display: fix a NULL pointer dereference in amdgpu_dm_i2c_xfer()" has been added to the 6.5-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.5-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.5 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
@@ -7394,6 +7394,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.5/drm-amd-display-guard-against-invalid-rptr-wptr-being-set.patch
queue-6.5/drm-amd-disable-pp_pcie_dpm_mask-when-dynamic-speed-.patch
queue-6.5/xhci-enable-rpm-on-controllers-that-support-low-power-states.patch
queue-6.5/drm-amd-update-update_pcie_parameters-functions-to-u.patch
queue-6.5/x86-pci-avoid-pme-from-d3hot-d3cold-for-amd-rembrandt-and-phoenix-usb4.patch
queue-6.5/pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
queue-6.5/drm-amd-display-change-the-dmcub-mailbox-memory-location-from-fb-to-inbox.patch
queue-6.5/drm-amd-fix-ubsan-array-index-out-of-bounds-for-smu7.patch
queue-6.5/drm-amdgpu-don-t-use-pci_is_thunderbolt_attached.patch
queue-6.5/drm-amd-display-fix-a-null-pointer-dereference-in-amdgpu_dm_i2c_xfer.patch
queue-6.5/drm-amd-display-fix-dsc-not-enabled-on-direct-mst-sink.patch
queue-6.5/drm-amdgpu-don-t-use-atrm-for-external-devices.patch
queue-6.5/drm-amdgpu-add-a-retry-for-ip-discovery-init.patch
queue-6.5/drm-amd-display-enable-fast-plane-updates-on-dcn3.2-and-above.patch
queue-6.5/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