When running dpdk test case, there is below calltrace because of allocating memory in atomic context. Call trace: ...... __might_resched+0x154/0x1c0 __might_sleep+0x54/0xa4 __kmem_cache_alloc_node+0x434/0x594 kmalloc_trace+0x54/0x140 dpa_alloc_reserve+0x100/0x19c qman_reserve_fqid_range+0x2c/0x3c usdpaa_ioctl+0x1314/0x1ae4 __arm64_sys_ioctl+0xb4/0x100 ...... To avoid this calltrace, replace GFP_KERNEL with GFP_ATOMIC.
Signed-off-by: Meng Li <[email protected]> --- drivers/staging/fsl_qbman/dpa_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl_qbman/dpa_alloc.c b/drivers/staging/fsl_qbman/dpa_alloc.c index a98779bf26da..e420ef73325a 100644 --- a/drivers/staging/fsl_qbman/dpa_alloc.c +++ b/drivers/staging/fsl_qbman/dpa_alloc.c @@ -654,7 +654,7 @@ int dpa_alloc_reserve(struct dpa_alloc *alloc, u32 base, u32 num) } } /* Add the allocation to the used list with a refcount of 1 */ - used_node = kmalloc(sizeof(*used_node), GFP_KERNEL); + used_node = kmalloc(sizeof(*used_node), GFP_ATOMIC); if (!used_node) { spin_unlock_irq(&alloc->lock); return -ENOMEM; -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13077): https://lists.yoctoproject.org/g/linux-yocto/message/13077 Mute This Topic: https://lists.yoctoproject.org/mt/101448250/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
