]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2024 09:25:08 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2024 09:25:08 +0000 (11:25 +0200)
added patches:
revert-drm-amd-amdgpu-fix-potential-ioremap-memory-leaks-in-amdgpu_device_init.patch

queue-6.6/revert-drm-amd-amdgpu-fix-potential-ioremap-memory-leaks-in-amdgpu_device_init.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/revert-drm-amd-amdgpu-fix-potential-ioremap-memory-leaks-in-amdgpu_device_init.patch b/queue-6.6/revert-drm-amd-amdgpu-fix-potential-ioremap-memory-leaks-in-amdgpu_device_init.patch
new file mode 100644 (file)
index 0000000..d16c897
--- /dev/null
@@ -0,0 +1,86 @@
+From 03c6284df179de3a4a6e0684764b1c71d2a405e2 Mon Sep 17 00:00:00 2001
+From: Ma Jun <Jun.Ma2@amd.com>
+Date: Tue, 19 Mar 2024 15:24:03 +0800
+Subject: Revert "drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgpu_device_init()"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ma Jun <Jun.Ma2@amd.com>
+
+commit 03c6284df179de3a4a6e0684764b1c71d2a405e2 upstream.
+
+This patch causes the following iounmap erorr and calltrace
+iounmap: bad address 00000000d0b3631f
+
+The original patch was unjustified because amdgpu_device_fini_sw() will
+always cleanup the rmmio mapping.
+
+This reverts commit eb4f139888f636614dab3bcce97ff61cefc4b3a7.
+
+Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
+Suggested-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   16 ++++++----------
+ 1 file changed, 6 insertions(+), 10 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -3639,10 +3639,8 @@ int amdgpu_device_init(struct amdgpu_dev
+        * early on during init and before calling to RREG32.
+        */
+       adev->reset_domain = amdgpu_reset_create_reset_domain(SINGLE_DEVICE, "amdgpu-reset-dev");
+-      if (!adev->reset_domain) {
+-              r = -ENOMEM;
+-              goto unmap_memory;
+-      }
++      if (!adev->reset_domain)
++              return -ENOMEM;
+       /* detect hw virtualization here */
+       amdgpu_detect_virtualization(adev);
+@@ -3652,20 +3650,20 @@ int amdgpu_device_init(struct amdgpu_dev
+       r = amdgpu_device_get_job_timeout_settings(adev);
+       if (r) {
+               dev_err(adev->dev, "invalid lockup_timeout parameter syntax\n");
+-              goto unmap_memory;
++              return r;
+       }
+       /* early init functions */
+       r = amdgpu_device_ip_early_init(adev);
+       if (r)
+-              goto unmap_memory;
++              return r;
+       amdgpu_device_set_mcbp(adev);
+       /* Get rid of things like offb */
+       r = drm_aperture_remove_conflicting_pci_framebuffers(adev->pdev, &amdgpu_kms_driver);
+       if (r)
+-              goto unmap_memory;
++              return r;
+       /* Enable TMZ based on IP_VERSION */
+       amdgpu_gmc_tmz_set(adev);
+@@ -3675,7 +3673,7 @@ int amdgpu_device_init(struct amdgpu_dev
+       if (adev->gmc.xgmi.supported) {
+               r = adev->gfxhub.funcs->get_xgmi_info(adev);
+               if (r)
+-                      goto unmap_memory;
++                      return r;
+       }
+       /* enable PCIE atomic ops */
+@@ -3932,8 +3930,6 @@ release_ras_con:
+ failed:
+       amdgpu_vf_error_trans_all(adev);
+-unmap_memory:
+-      iounmap(adev->rmmio);
+       return r;
+ }
index bb557224731bd71806dfecb53e36c1f6ed807575..5dad04b0821e9f14577922823e1e5bcee6a93132 100644 (file)
@@ -111,3 +111,4 @@ platform-x86-intel-vbtn-update-tablet-mode-switch-at.patch
 bluetooth-btintel-fixe-build-regression.patch
 net-mpls-error-out-if-inner-headers-are-not-set.patch
 vmci-fix-possible-memcpy-run-time-warning-in-vmci_datagram_invoke_guest_handler.patch
+revert-drm-amd-amdgpu-fix-potential-ioremap-memory-leaks-in-amdgpu_device_init.patch