Hi bruce

Please help me merge this patch to branch 
v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc and 
v5.15/standard/nxp-sdk-5.15/nxp-soc

Thanks
Xiaolei

-----Original Message-----
From: [email protected] <[email protected]> 
On Behalf Of Xiaolei Wang via lists.yoctoproject.org
Sent: Tuesday, November 15, 2022 11:39 AM
To: [email protected]
Cc: [email protected]
Subject: [linux-yocto] [kernel-source][PATCH 1/2] 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 bd21ebe013c9("video: fbdev: mxc: Release the previously allocated modedb 
before parsing edid")
Signed-off-by: Xiaolei Wang <[email protected]>
---
 drivers/video/fbdev/mxc/mxsfb_sii902x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/mxc/mxsfb_sii902x.c 
b/drivers/video/fbdev/mxc/mxsfb_sii902x.c
index c72214de83c7..54a9bc5471ca 100644
--- a/drivers/video/fbdev/mxc/mxsfb_sii902x.c
+++ b/drivers/video/fbdev/mxc/mxsfb_sii902x.c
@@ -397,7 +397,7 @@ static int sii902x_probe(struct i2c_client *client,
                const struct i2c_device_id *id)
 {
        int i, dat, ret;
-       struct fb_info edid_fbi;
+       struct fb_info edid_fbi = {};
        struct fb_info *init_fbi = sii902x.fbi;
 
        memset(&sii902x, 0, sizeof(sii902x));
--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11888): 
https://lists.yoctoproject.org/g/linux-yocto/message/11888
Mute This Topic: https://lists.yoctoproject.org/mt/95036633/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to