lkml.org 
[lkml]   [2019]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.0 42/89] drm/vc4: Fix memory leak during gpu reset.
    Date
    From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

    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>

    ---
    drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- 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)

    \
     
     \ /
      Last update: 2019-04-30 13:55    [W:4.158 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site