author | apollo.ling <apollo.ling@amlogic.com> | 2019-11-05 08:16:15 (GMT) |
---|---|---|
committer | Apollo Ling <apollo.ling@amlogic.com> | 2019-11-07 11:44:27 (GMT) |
commit | eeb07bf4c81fdfb20622ac79d733434aeb4cdcb7 (patch) | |
tree | 2b3a428926862e7cb9b845d270da08cb99828459 | |
parent | f9eb2955faffc2ee36339cd3ef05f01d528f1150 (diff) | |
download | media_modules-eeb07bf4c81fdfb20622ac79d733434aeb4cdcb7.zip media_modules-eeb07bf4c81fdfb20622ac79d733434aeb4cdcb7.tar.gz media_modules-eeb07bf4c81fdfb20622ac79d733434aeb4cdcb7.tar.bz2 |
media_module: fix the call sequence of del_timer_sync and cancel_work_sync [1/1]
PD#SWPL-16242
Problem:
{stresstest} {KASAN} avs bug causes system crash when do DTV 2s channel switch
and 15s suspend.(1/6,none)
Solution:
correct the call sequence of del_timer_sync and cancel_work_sync
Verify:
X301
Change-Id: I53534f207d3379fe6e463ae2e57badeceeb5f9ec
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/avs/avs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/frame_provider/decoder/avs/avs.c b/drivers/frame_provider/decoder/avs/avs.c index 5d85fb9..642c3bb 100644 --- a/drivers/frame_provider/decoder/avs/avs.c +++ b/drivers/frame_provider/decoder/avs/avs.c @@ -1722,6 +1722,10 @@ static int amvdec_avs_probe(struct platform_device *pdev) static int amvdec_avs_remove(struct platform_device *pdev) { + if (stat & STAT_TIMER_ARM) { + del_timer_sync(&recycle_timer); + stat &= ~STAT_TIMER_ARM; + } cancel_work_sync(&fatal_error_wd_work); atomic_set(&error_handler_run, 0); @@ -1738,10 +1742,6 @@ static int amvdec_avs_remove(struct platform_device *pdev) stat &= ~STAT_ISR_REG; } - if (stat & STAT_TIMER_ARM) { - del_timer_sync(&recycle_timer); - stat &= ~STAT_TIMER_ARM; - } #ifdef AVSP_LONG_CABAC if (firmware_sel == 0) { mutex_lock(&vavs_mutex); |