gpu: fixed fence handling error [1/2]
authorJiyu Yang <jiyu.yang@amlogic.com>
Wed, 26 Jun 2019 06:02:13 +0000 (14:02 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Wed, 3 Jul 2019 06:00:38 +0000 (23:00 -0700)
commit8e2b27ba54072ebf3c1574c81c248e4d3d6b8d8c
treec905676dc9f015bd71a675344654155e4afd3daa
parent589a4a01ef42b49ed52921e2f37fa59fad5edeea
gpu: fixed fence handling error [1/2]

PD#SWPL-10285

Problem:
Security issue with fence handling error path on
Linux 4.9.68 and later

Solution:
Modify the function kbase_sync_fence_out_create() in file
drivers/gpu/arm/midgard/mali_kbase_sync_file.c to Insert
Lines as follows to ensure the dma_fence_put() call only happens on
Linux 4.9.67 or lower

Verify:
franklin

Change-Id: I5832be0b8a1065107e2ff092abfe43910e5ddad5
Signed-off-by: Jiyu Yang <jiyu.yang@amlogic.com>
bifrost/r10p0/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
bifrost/r15p0/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
bifrost/r9p0/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c