summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykhailo Sopiha2018-11-19 18:29:23 -0600
committerPraneeth Bajjuri2018-11-27 14:31:15 -0600
commit63998e4f98ff0122799d4e37f95a5f0c2df2204e (patch)
tree24f2ca9b47f6cb894f89351a2ac87936f1a2bf97
parent493daaec1e59310ccbd342fdd918d069e495b769 (diff)
downloadvendor-ti-dra7xx-sgx-km-from-source.tar.gz
vendor-ti-dra7xx-sgx-km-from-source.tar.xz
vendor-ti-dra7xx-sgx-km-from-source.zip
sgx_km: fix pvrsrvkm.ko double list_del errorsgx-km-from-source
This patch fixes double list_del error while PVR_FENCE_CONTEXT object destruction. For sw timeline sFenseCtxList is being deleted while PVR_SYNC_IOC_FORCE_SW_ONLY ioctl, so it should not be deleted once more on PVRSyncRelease call. Signed-off-by: Mykhailo Sopiha <mykhailo.sopiha@linaro.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Acked-by: Andrew F. Davis <afd@ti.com>
-rw-r--r--sgx_km/eurasia_km/services4/srvkm/env/linux/pvr_fence.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sgx_km/eurasia_km/services4/srvkm/env/linux/pvr_fence.c b/sgx_km/eurasia_km/services4/srvkm/env/linux/pvr_fence.c
index 0eba5a6..13bda56 100644
--- a/sgx_km/eurasia_km/services4/srvkm/env/linux/pvr_fence.c
+++ b/sgx_km/eurasia_km/services4/srvkm/env/linux/pvr_fence.c
@@ -843,9 +843,16 @@ static int PVRSyncRelease(struct inode *inode, struct file *psFile)
843 */ 843 */
844 pvr_counting_fence_timeline_force_complete(psTimeline->pSWTimeline); 844 pvr_counting_fence_timeline_force_complete(psTimeline->pSWTimeline);
845 pvr_counting_fence_timeline_put(psTimeline->pSWTimeline); 845 pvr_counting_fence_timeline_put(psTimeline->pSWTimeline);
846 }
847 846
848 pvr_fence_context_destroy(psTimeline->psFenceCtx); 847 /*
848 * pvr_fence_context_destroy can not be called for sw timeline -
849 * otherwise it leads to double list_del on sFenceCtxList
850 */
851 kref_put(&psTimeline->psFenceCtx->sRef, pvr_fence_context_destroy_kref);
852 } else {
853 pvr_fence_context_destroy(psTimeline->psFenceCtx);
854 }
855
849 PVRSyncReleaseSyncInfo(psTimeline->psSyncInfo); 856 PVRSyncReleaseSyncInfo(psTimeline->psSyncInfo);
850 kfree(psTimeline); 857 kfree(psTimeline);
851 858