Skip to content
Commit 41d93145 authored by Pan Bian's avatar Pan Bian Committed by Zhenyu Wang
Browse files

drm/i915/gvt: fix dropping obj reference twice



The reference count of obj will be decremented twice if error occurs
in dma_buf_fd(). Additionally, attempting to read the reference count of
obj after dropping reference may lead to a use after free bug. Here, we
drop obj's reference until it is not used.

Fixes: e546e281 ("drm/i915/gvt: Dmabuf support for GVT-g")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Reviewed-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent ee2c5ef8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment