From: Ruiqiang Hao <ruiqiang....@windriver.com> commit 02b4d71948b3(octeontx2-af: Skip PFs if not enabled) conflicts with commit 6b914fc07ca8(octeontx2-af: Skip PFs if not enabled) from marvell SDK11. When merged this into v5.15.112, we allocate bitmaps using devm_kcalloc() and free bitmaps using bitmap_free(), this will cause memory free error and the following panic, replace devm_kcalloc() with bitmap_zalloc() to solve this problem.
Unable to handle kernel paging request at virtual address ffff8000093e8810 Mem abort info: ESR = 0x0000000096000047 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x07: level 3 translation fault Data abort info: ISV = 0, ISS = 0x00000047 CM = 0, WnR = 1 swapper pgtable: 64k pages, 48-bit VAs, pgdp=0000000041450000 [ffff8000093e8810] pgd=1000000bf9fe0803, p4d=1000000bf9fe0803, pud=1000000bf9fe0803, pmd=1000000bf9fd0803, pte=0000000000000000 Internal error: Oops: 96000047 [#1] PREEMPT SMP Modules linked in: CPU: 11 PID: 1 Comm: systemd Not tainted 5.15.116-yocto-standard #1 Hardware name: Marvell OcteonTX CN96XX board (DT) pstate: 804000c9 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : queued_spin_lock_slowpath+0x200/0x3a0 lr : queued_spin_lock_slowpath+0x64/0x3a0 sp : ffff800009e2f9f0 x29: ffff800009e2f9f0 x28: 00000000ffffffec x27: 0000000000000049 x26: ffffffffffffffff x25: 0000000000000000 x24: ffff000bedf8f0c8 x23: ffff8000097442f8 x22: 0000000000000000 x21: ffff8000093e8800 x20: ffff000bf6198800 x19: ffff000bedf8f0c8 x18: 0000000000010000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000001 x14: 0000000000000001 x13: ffff000119a10000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000028 x9 : ffff800008dd3134 x8 : fefefefefefefeff x7 : 0000000000000040 x6 : 0000000000000000 x5 : 0000000000000000 x4 : ffff000bf6198800 x3 : ffff8000093e8810 x2 : 0000000000000000 x1 : ffff000bf6198808 x0 : 0000000000300000 Call trace: queued_spin_lock_slowpath+0x200/0x3a0 _raw_spin_lock_irq+0x94/0xb0 wq_worker_comm+0x94/0xe0 proc_task_name+0x50/0xd0 do_task_stat+0x3a8/0xa60 proc_tgid_stat+0x1c/0x30 proc_single_show+0x68/0x12c seq_read_iter+0x1bc/0x4b0 seq_read+0xe0/0x140 vfs_read+0xb4/0x1b4 ksys_read+0x70/0x100 __arm64_sys_read+0x24/0x30 invoke_syscall.constprop.0+0x58/0xf0 do_el0_svc+0x60/0x160 el0_svc+0x28/0xe0 el0t_64_sync_handler+0xa4/0x130 el0t_64_sync+0x1a0/0x1a4 Code: 51000422 8b0302a3 91002081 f862dae2 (f8226864) ---[ end trace 15a9f1de12dfc7a2 ]--- note: systemd[1] exited with preempt_count 1 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b SMP: stopping secondary CPUs Kernel Offset: disabled CPU features: 0x0c,000004d1,a3200e40 Memory Limit: none ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- Signed-off-by: Ruiqiang Hao <ruiqiang....@windriver.com> --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c index bad16f561cd4..a199b04aa31b 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c @@ -2538,7 +2538,7 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw, const char *name; u64 cfg; - pf_bmap = devm_kcalloc(rvu->dev, BITS_TO_LONGS(num), sizeof(long), GFP_KERNEL); + pf_bmap = bitmap_zalloc(num, GFP_KERNEL); if (!pf_bmap) return -ENOMEM; -- 2.39.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12792): https://lists.yoctoproject.org/g/linux-yocto/message/12792 Mute This Topic: https://lists.yoctoproject.org/mt/99765804/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-