From: Eric Anholt Date: Tue, 26 Jul 2016 20:47:10 +0000 (-0700) Subject: drm/vc4: Use drm_free_large() on handles to match its allocation. X-Git-Tag: v4.7.4~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ae2ba7afed02d9ff0f0473bfb8d1971a75910cb;p=thirdparty%2Fkernel%2Fstable.git drm/vc4: Use drm_free_large() on handles to match its allocation. commit d5fb46e0e3b7e49ee83ba92efc3ab4e1a545ecc1 upstream. If you managed to exceed the limit to switch to vmalloc, we'd use the wrong free. Signed-off-by: Eric Anholt Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 46899d6de6753..f9b13b54c86b7 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -574,7 +574,7 @@ vc4_cl_lookup_bos(struct drm_device *dev, spin_unlock(&file_priv->table_lock); fail: - kfree(handles); + drm_free_large(handles); return 0; }