]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: dpu: Fix memory leak caused by dropped reference
authorSean Paul <seanpaul@chromium.org>
Thu, 4 Oct 2018 18:09:44 +0000 (14:09 -0400)
committerRob Clark <robdclark@gmail.com>
Sun, 7 Oct 2018 18:40:28 +0000 (14:40 -0400)
commit29a6979c37adde99af00fae73a8229ca653f0656
tree88edf4c6c8034d2e0cdbaee6d5b59884a2ddbc80
parent998e06bb8ef0f2003619405970197af18421cb42
drm/msm: dpu: Fix memory leak caused by dropped reference

We are currently leaking a drm_crtc_commit struct for every atomic
commit containing plane state. The dpu plane destroy function cleans up
the fb reference manually, but fails to release the commit ref. As a
result, we just keep allocating drm_crtc_commits without ever freeing
them. Fortunately there's a helper function which will clean up all of
our mess at once, so use that.

Thanks to Doug Anderson for reporting the memory leak (and leaving
breadcrumbs from kmemleak!).

Reported-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c