msm: kgsl: Call fd_install after creating hw fence
Once fd_install is done, userspace can predict the dma fence fd and call close(fd). And say the dma fence get signaled at the same time as well. Then both these operations will reduce the refcount of the dma fence to zero thereby freeing the kfence. This can cause use-after-free of the kfence in the hardware fence creation path. To avoid this, do fd_install after creating hw fence. Change-Id: Ib9c446562ff5199e469c7db9581518fb5a695e3f Signed-off-by:Harshdeep Dhatt <[email protected]> Signed-off-by:
Sanjay Yadav <[email protected]>
Loading