amdolby_vision: fix kernel crash [1/1]
authorshuanglong.wang <shuanglong.wang@amlogic.com>
Tue, 2 Oct 2018 07:56:32 +0000 (15:56 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 12 Oct 2018 05:37:20 +0000 (22:37 -0700)
commit048afccfd231efdeba0b2e371631891c033724e9
tree30ca708532cc9e46a7d149afd6e1732399517085
parent3413ce1850a1f7fdaa5a3cc646ba130973c91769
amdolby_vision: fix kernel crash [1/1]

PD# 173406

Problem:
kernel crash when play dv after insmod 4.9 stb dovi.ko at t962x-r311 platform
[  118.398098@0] Internal error: Oops: 96000047 [#1] PREEMPT SMP
[  118.440794@0] CPU: 0 PID: 2869 Comm: irq/40-vdec-0 Tainted: GO    4.9.113 #2
[  118.448726@0] Hardware name: Amlogic (DT)
[  118.452694@0] task: ffffffc01ae2b700 task.stack: ffffffc023e4c000
[  118.458740@0] PC is at __memcpy+0x110/0x180
[  118.462878@0] LR is at dolby_vision_parse_metadata+0xb3c/0x1920
[  118.468736@0] pc : [<ffffff800947c690>] lr : [<ffffff800998b33c>]pstate: 200001c5
[  118.476239@0] sp : ffffffc027e3fb30

Solution:
fix vmalloc error, function pointer add protection

Verify:
need verify at t962x-r311 platform

Change-Id: I3f0872480dabbf8b415d798d6b205028f08fd89a
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c