• Puranam V G Tejaswi's avatar
    msm: kgsl: Signal fence only if last fence refcount was not put · 339824df
    Puranam V G Tejaswi authored
    
    
    Currently there is a chance that release for the fence was already called
    before we call dma_fence_get during kgsl_timeline_signal and
    kgsl_ioctl_timeline_destroy. This can cause use-after-free issue as we can
    access fence after release. Fix this by signalling fence only if the last
    refcount on the fence was not yet put. This makes sure that release for the
    fence will not be called until we are done signalling.
    
    Change-Id: I6bdcefa1f128febb7a0f7aef133757268a3b9ae3
    Signed-off-by: default avatarPuranam V G Tejaswi <quic_pvgtejas@quicinc.com>
    339824df
kgsl_timeline.c 12.9 KB