deinterace: set driver_data to NULL on shutdown release [1/1]

PD#SWPL-10079

Problem:
use-after-free issue
driver_data is relesed on shutdown, it is used in kthread_di
this thread is not stopped, will return if driver_data is NULL

Solution:
set driver_data to NULL on shutdown release

Verify:
verified on TL1-X301

Change-Id: I64fd1e39e6cedcc801d4d451eb1a56ca2ccc3364
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
This commit is contained in:
Jian Cao
2019-07-01 15:15:03 +08:00
parent 391be171d9
commit fdcae78480

View File

@@ -8554,6 +8554,7 @@ static void di_shutdown(struct platform_device *pdev)
switch_vpu_clk_gate_vmod(VPU_VPU_CLKB,
VPU_CLK_GATE_OFF);
kfree(di_devp);
di_devp = NULL;
pr_info("[DI] shutdown done.\n");
}