0481-drm-vc4-Use-drm_free_large-on-handles-to-match-its-a.patch 786 B

123456789101112131415161718192021222324252627
  1. From dd5e781b91b431e19cba0f0763a2821a60277a7b Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Tue, 19 Jul 2016 11:31:19 -0700
  4. Subject: [PATCH] drm/vc4: Use drm_free_large() on handles to match its
  5. allocation.
  6. If you managed to exceed the limit to switch to vmalloc, we'd use the
  7. wrong free.
  8. Signed-off-by: Eric Anholt <eric@anholt.net>
  9. Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
  10. Cc: stable@vger.kernel.org
  11. ---
  12. drivers/gpu/drm/vc4/vc4_gem.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. --- a/drivers/gpu/drm/vc4/vc4_gem.c
  15. +++ b/drivers/gpu/drm/vc4/vc4_gem.c
  16. @@ -584,7 +584,7 @@ vc4_cl_lookup_bos(struct drm_device *dev
  17. spin_unlock(&file_priv->table_lock);
  18. fail:
  19. - kfree(handles);
  20. + drm_free_large(handles);
  21. return 0;
  22. }