[PATCH] drm/i915/gvt: fix dropping obj reference twice

2019-11-06 Thread Pan Bian
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. Signed-off-by: Pan Bian --- drivers/gpu

Re: [PATCH] drm/i915/gvt: fix dropping obj reference twice

2019-11-06 Thread Zhenyu Wang
On 2019.11.06 15:31:07 +0800, Pan Bian wrote: > 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 i