diff options
author | Maarten Lankhorst | 2019-03-01 13:56:11 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-05-02 09:58:55 +0200 |
commit | 2c892ef094353bf8e9203a3f391158fbfaff4b06 (patch) | |
tree | b76e169e48cec0bf3fcaf2e2399f488243e2c3b0 /drivers/gpu/drm/vc4 | |
parent | powerpc/mm/radix: Make Radix require HUGETLB_PAGE (diff) | |
download | kernel-qcow2-linux-2c892ef094353bf8e9203a3f391158fbfaff4b06.tar.gz kernel-qcow2-linux-2c892ef094353bf8e9203a3f391158fbfaff4b06.tar.xz kernel-qcow2-linux-2c892ef094353bf8e9203a3f391158fbfaff4b06.zip |
drm/vc4: Fix memory leak during gpu reset.
commit d08106796a78a4273e39e1bbdf538dc4334b2635 upstream.
__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+
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-2-maarten.lankhorst@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_crtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 0e6a121858d1..ad55ded8b3d8 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -998,7 +998,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) |