Skip to content
Commit 90933449 authored by Sanjay Yadav's avatar Sanjay Yadav
Browse files

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: default avatarHarshdeep Dhatt <[email protected]>
Signed-off-by: default avatarSanjay Yadav <[email protected]>
parent 7407049d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment