From: Greg Kroah-Hartman Date: Tue, 11 May 2021 11:54:42 +0000 (+0200) Subject: drop drm-amdgpu-fix-memory-leak.patch from 5.11 and 5.12 X-Git-Tag: v5.4.118~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf36cbb3a1c1176192f094fd252d7de7b13891dc;p=thirdparty%2Fkernel%2Fstable-queue.git drop drm-amdgpu-fix-memory-leak.patch from 5.11 and 5.12 --- diff --git a/queue-5.11/drm-amdgpu-fix-memory-leak.patch b/queue-5.11/drm-amdgpu-fix-memory-leak.patch deleted file mode 100644 index 784bc5945a6..00000000000 --- a/queue-5.11/drm-amdgpu-fix-memory-leak.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1694bcb5752671d8d9b2f638c559f6ca676da2fc Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 17 Mar 2021 17:33:02 +0800 -Subject: drm/amdgpu: Fix memory leak - -From: xinhui pan - -[ Upstream commit 79fcd446e7e182c52c2c808c76f8de3eb6714349 ] - -drm_gem_object_put() should be paired with drm_gem_object_lookup(). - -All gem objs are saved in fb->base.obj[]. Need put the old first before -assign a new obj. - -Trigger VRAM leak by running command below -$ service gdm restart - -Signed-off-by: xinhui pan -Acked-by: Alex Deucher -Signed-off-by: Alex Deucher -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c -index 48cb33e5b382..f5fa1befa7e2 100644 ---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c -+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c -@@ -910,8 +910,9 @@ int amdgpu_display_framebuffer_init(struct drm_device *dev, - } - - for (i = 1; i < rfb->base.format->num_planes; ++i) { -+ drm_gem_object_get(rfb->base.obj[0]); -+ drm_gem_object_put(rfb->base.obj[i]); - rfb->base.obj[i] = rfb->base.obj[0]; -- drm_gem_object_get(rfb->base.obj[i]); - } - - return 0; -@@ -960,6 +961,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev, - return ERR_PTR(ret); - } - -+ drm_gem_object_put(obj); - return &amdgpu_fb->base; - } - --- -2.30.2 - diff --git a/queue-5.11/series b/queue-5.11/series index be5de460f93..b861cc8c4ff 100644 --- a/queue-5.11/series +++ b/queue-5.11/series @@ -171,7 +171,6 @@ drm-amd-pm-fix-workload-mismatch-on-vega10.patch drm-amd-display-fix-ubsan-warning-for-not-a-valid-va.patch drm-amd-display-dchub-underflow-counter-increasing-i.patch drm-amd-display-fix-dml-prefetch-validation.patch -drm-amdgpu-fix-memory-leak.patch scsi-qla2xxx-always-check-the-return-value-of-qla24x.patch drm-vkms-fix-misuse-of-warn_on.patch scsi-qla2xxx-fix-use-after-free-in-bsg.patch diff --git a/queue-5.12/drm-amdgpu-fix-memory-leak.patch b/queue-5.12/drm-amdgpu-fix-memory-leak.patch deleted file mode 100644 index e655c3c7c69..00000000000 --- a/queue-5.12/drm-amdgpu-fix-memory-leak.patch +++ /dev/null @@ -1,51 +0,0 @@ -From ff844105788999cf8e51e9848edda2f359687b5d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 17 Mar 2021 17:33:02 +0800 -Subject: drm/amdgpu: Fix memory leak - -From: xinhui pan - -[ Upstream commit 79fcd446e7e182c52c2c808c76f8de3eb6714349 ] - -drm_gem_object_put() should be paired with drm_gem_object_lookup(). - -All gem objs are saved in fb->base.obj[]. Need put the old first before -assign a new obj. - -Trigger VRAM leak by running command below -$ service gdm restart - -Signed-off-by: xinhui pan -Acked-by: Alex Deucher -Signed-off-by: Alex Deucher -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c -index f753e04fee99..cbe050436c7b 100644 ---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c -+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c -@@ -910,8 +910,9 @@ int amdgpu_display_framebuffer_init(struct drm_device *dev, - } - - for (i = 1; i < rfb->base.format->num_planes; ++i) { -+ drm_gem_object_get(rfb->base.obj[0]); -+ drm_gem_object_put(rfb->base.obj[i]); - rfb->base.obj[i] = rfb->base.obj[0]; -- drm_gem_object_get(rfb->base.obj[i]); - } - - return 0; -@@ -960,6 +961,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev, - return ERR_PTR(ret); - } - -+ drm_gem_object_put(obj); - return &amdgpu_fb->base; - } - --- -2.30.2 - diff --git a/queue-5.12/series b/queue-5.12/series index 38a368240a9..a42b7ed4c8a 100644 --- a/queue-5.12/series +++ b/queue-5.12/series @@ -192,7 +192,6 @@ drm-amd-display-fix-ubsan-warning-for-not-a-valid-va.patch drm-amd-display-dchub-underflow-counter-increasing-i.patch drm-amd-display-fix-dml-prefetch-validation.patch drm-amd-display-fix-potential-memory-leak.patch -drm-amdgpu-fix-memory-leak.patch scsi-qla2xxx-always-check-the-return-value-of-qla24x.patch drm-vkms-fix-misuse-of-warn_on.patch block-bfq-fix-weight-raising-resume-with-low_latency.patch