]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value
authorXidong Wang <wangxidong_97@163.com>
Wed, 4 Apr 2018 09:38:24 +0000 (10:38 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 4 Apr 2018 19:53:51 +0000 (20:53 +0100)
commit0856a464ce5c5bb795ca480d456596c62a45e41e
tree5b0c203fa516b5590030b9e3ef18fff26328dce7
parentf1b959a8ca34931f60cfe505dbd5cb1bc4daff2a
drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value

Along the eb_lookup_vmas() error path, the return value from
kmem_cache_alloc() was freed using kfree(). Fix it to use the proper
kmem_cache_free() instead.

Fixes: 1b5dde0153b2 ("drm/i915: Replace execbuf vma ht with an idr")
Signed-off-by: Xidong Wang <wangxidong_97@163.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v4.14+
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180404093824.9313-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_execbuffer.c