drm/vc4: Fix double destroy of the BO cache on teardown. 01/148501/2
authorEric Anholt <eric@anholt.net>
Wed, 2 Aug 2017 19:48:04 +0000 (12:48 -0700)
committerInki Dae <inki.dae@samsung.com>
Fri, 8 Sep 2017 05:02:08 +0000 (14:02 +0900)
commit680658971ac9054d50f22121f984a18cc82c5a7a
tree5ecb0e2eef87ea8766fe50f82ecc8b832e46fbea
parentcdc6e27af602a77f536c62164e918ee31e1e1c50
drm/vc4: Fix double destroy of the BO cache on teardown.

It's also destroyed from the top level vc4_drv.c initialization, which
is where the cache was actually initialized from.

This used to just involve duplicate del_timer() and cancel_work_sync()
being called, but it started causing kmalloc issues once we
double-freed the new BO label array.

Fixes: 1908a876f909 ("drm/vc4: Add an ioctl for labeling GEM BOs for summary stats")
Signed-off-by: Eric Anholt <eric@anholt.net>
[inki.dae: apply from rpi3-4.9.y]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I1727a2c8c222f62fe314d7c800871c924905349c
drivers/gpu/drm/vc4/vc4_gem.c