video: sii902x: Fix panic caused by sii902x_read_edid
The data structure edid_fbi needs to be initialized, otherwise edid_fbi->monspecs.modedb and fbi->monspecs.modedb_len are not initial values, which will cause illegal free to be detected by KASAN, and the following panic will appear: Unable to handle kernel paging request at virtual address 80f5e000 pgd = 41eceede [80f5e000] *pgd=80e1941e(bad) Internal error: Oops: 80d [#1] PREEMPT SMP ARM Modules linked in: PC is at copy_page+0x1c/0x70 LR is at 0x7fb78 pc : [<8062f37c>] lr : [<0007fb78>] psr: 60010113 sp : 815a5ea8 ip : 0007fb7c fp : 80119288 r10: 00000040 r9: 815a4000 r8: 815a5fb0 r7 : 76af0000 r6 : 00000200 r5 : 80f5e000 r4 : 0007fb80 r3 : 00080000 r2 : 0000001f r1 : 813f8010 r0 : 80f5e000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 83a7406a DAC: 00000051 Register r0 information: non-slab/vmalloc memory Register r1 information: non-slab/vmalloc memory Register r2 information: non-paged memory Register r3 information: non-paged memory Register r4 information: non-paged memory Register r5 information: non-slab/vmalloc memory Register r6 information: non-paged memory Register r7 information: non-paged memory Register r8 information: non-slab/vmalloc memory Register r9 information: non-slab/vmalloc memory Register r10 information: non-paged memory Register r11 information: non-slab/vmalloc memory Register r12 information: non-paged memory Process init (pid: 1, stack limit = 0x6432d6db) Stack: (0x815a5ea8 to 0x815a6000) 5ea0: 813f8000 801192b8 81d49900 00000d73 00000200 802ab694 5ec0: 00000003 801734d8 81d28040 80173e10 81d499c0 00000275 81d499d0 b1f55299 5ee0: 76aef000 76aef000 81d49900 01100cca 00000070 76af0000 00000275 83a75da8 5f00: 83a75da8 00000000 ab67b938 ab685ee0 00000000 00000000 00000000 b1f55299 5f20: 00000001 815a5fb0 76af0124 81d28000 00000817 81d49900 00000275 81d28040 5f40: 81380b40 80ccc7e0 815a5f50 815a5f54 00000000 815a5f54 815a5f54 00000800 5f60: 00000001 00000817 76af0124 ffffffff 815a5fb0 8120b23c 00080144 7ee89ff0 5f80: 00000002 80114db8 76af0124 00000817 815a5fb0 76af0124 76fca960 20010010 5fa0: ffffffff 10c5387d 10c5387d 8010167c 76af0124 00000000 00000018 76af0124 5fc0: 76fda2b8 7ee8a00c 76af0144 7ee8a0b8 00000003 00080144 7ee89ff0 00000002 5fe0: 00000000 7ee89fc8 76fb839b 76fca960 20010010 ffffffff 00000000 00000000 Code: e3a0201f e8b15018 f5d1f080 f5d1f0c0 (e8a05018) ---[ end trace a0459ca32b040418 ]--- note: init[1] exited with preempt_count 2 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b CPU0: stopping Fixed bd21ebe0("video: fbdev: mxc: Release the previously allocated modedb before parsing edid") Signed-off-by:Xiaolei Wang <xiaolei.wang@windriver.com> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com>
Loading
Please register or sign in to comment