From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Eric Anholt <eric@anholt.net>, stable@vger.kernel.org Subject: [PATCH 1/2] drm/vc4: Fix memory leak during gpu reset. Date: Mon, 12 Nov 2018 16:01:13 +0100 [thread overview] Message-ID: <20181112150114.18395-1-maarten.lankhorst@linux.intel.com> (raw) __drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function. Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.") Cc: Eric Anholt <eric@anholt.net> Cc: <stable@vger.kernel.org> # v4.6+ Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 3ce136ba8791..cd226e63d557 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -999,7 +999,7 @@ static void vc4_crtc_reset(struct drm_crtc *crtc) { if (crtc->state) - __drm_atomic_helper_crtc_destroy_state(crtc->state); + vc4_crtc_destroy_state(crtc->state); crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); if (crtc->state) -- 2.19.1
WARNING: multiple messages have this Message-ID (diff)
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: [PATCH 1/2] drm/vc4: Fix memory leak during gpu reset. Date: Mon, 12 Nov 2018 16:01:13 +0100 [thread overview] Message-ID: <20181112150114.18395-1-maarten.lankhorst@linux.intel.com> (raw) __drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function. Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.") Cc: Eric Anholt <eric@anholt.net> Cc: <stable@vger.kernel.org> # v4.6+ Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 3ce136ba8791..cd226e63d557 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -999,7 +999,7 @@ static void vc4_crtc_reset(struct drm_crtc *crtc) { if (crtc->state) - __drm_atomic_helper_crtc_destroy_state(crtc->state); + vc4_crtc_destroy_state(crtc->state); crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); if (crtc->state) -- 2.19.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-11-13 1:02 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-12 15:01 Maarten Lankhorst [this message] 2018-11-12 15:01 ` [PATCH 1/2] drm/vc4: Fix memory leak during gpu reset Maarten Lankhorst 2018-11-12 15:01 ` [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere Maarten Lankhorst 2018-11-12 15:36 ` Heiko Stuebner 2018-11-12 15:36 ` Heiko Stuebner 2018-11-12 15:36 ` Heiko Stuebner [not found] ` <20181112150114.18395-2-maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> 2018-11-12 15:11 ` Boris Brezillon 2018-11-12 15:23 ` Li, Sun peng (Leo) 2018-11-12 15:23 ` Li, Sun peng (Leo) 2018-11-12 15:23 ` Li, Sun peng (Leo) 2018-11-12 15:36 ` Thierry Reding 2018-11-12 16:02 ` Wentland, Harry 2018-11-12 16:11 ` Sean Paul 2018-11-12 17:33 ` Maarten Lankhorst 2018-11-12 20:01 ` Liviu Dudau 2018-11-12 20:01 ` Liviu Dudau 2018-11-12 20:01 ` Liviu Dudau 2018-11-18 13:31 ` Rodrigo Siqueira 2018-11-21 18:41 ` Lyude Paul 2018-11-12 18:21 ` [Intel-gfx] " Ville Syrjälä 2018-11-20 7:08 ` CK Hu 2018-11-20 7:08 ` CK Hu 2018-11-20 9:30 ` Philipp Zabel 2018-11-21 21:06 ` Kieran Bingham 2018-11-12 15:40 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/vc4: Fix memory leak during gpu reset Patchwork 2018-11-12 15:41 ` ✗ Fi.CI.SPARSE: " Patchwork 2018-11-12 15:56 ` ✓ Fi.CI.BAT: success " Patchwork 2018-11-12 17:26 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181112150114.18395-1-maarten.lankhorst@linux.intel.com \ --to=maarten.lankhorst@linux.intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=eric@anholt.net \ --cc=intel-gfx@lists.freedesktop.org \ --cc=stable@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.