core: Update to the new chaining format from physical driver
Use the skb_walk_frags() format to unchain packets instead of recursively using frag_list. Otherwise this could result in the following - apps_ipa_packet_receive_notify: 332 callbacks suppressed ipa-wan apps_ipa_packet_receive_notify:1660 fail on netif_receive_skb ipa-wan apps_ipa_packet_receive_notify:1660 fail on netif_receive_skb ipa-wan apps_ipa_packet_receive_notify:1660 fail on netif_receive_skb Insufficient stack space to handle exception! Kernel panic - not syncing: kernel stack overflow Call trace: dump_backtrace.cfi_jt+0x0/0x8 dump_stack_lvl+0x98/0xe8 panic+0x190/0x458 panic_bad_stack+0x1c8/0x200 patch_alternative+0x0/0x124 __bad_stack+0x90/0x94 arch_stack_walk+0x34/0x144 save_stack+0x8c/0xf4 free_pcp_prepare+0x378/0x430 free_unref_page+0x40/0x1d4 free_compound_page+0x8c/0xd8 skb_release_data+0x238/0x460 kfree_skb+0x8c/0x214 skb_release_data+0x28c/0x460 kfree_skb+0x8c/0x214 skb_release_data+0x28c/0x460 kfree_skb+0x8c/0x214 ... skb_release_data+0x28c/0x460 kfree_skb+0x8c/0x214 skb_release_data+0x28c/0x460 kfree_skb+0x8c/0x214 enqueue_to_backlog+0x104/0x3ac netif_receive_skb_internal+0x114/0x154 netif_receive_skb+0x20/0x1a4 apps_ipa_packet_receive_notify+0xbc/0x43c [ipam] ipa3_wan_rx_pyld_hdlr+0xa0/0xbf0 [ipam] ipa3_rx_napi_chain+0x310/0x594 [ipam] ipa3_rx_poll+0x1bc/0x8e0 [ipam] ipa3_rmnet_poll+0x28/0xa8 [ipam] __napi_poll+0x64/0x268 net_rx_action+0x144/0x3f8 _stext+0x1dc/0x6dc run_ksoftirqd+0x50/0xac smpboot_thread_fn+0x1b0/0x400 kthread+0x17c/0x1e0 ret_from_fork+0x10/0x20 CRs-Fixed: 3372964 Change-Id: I9f252e018c10e11ba88ed8626b776bd65286be96 Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@@ -1913,6 +1913,7 @@ void rmnet_frag_ingress_handler(struct sk_buff *skb,
|
||||
LIST_HEAD(desc_list);
|
||||
bool skip_perf = (skb->priority == 0xda1a);
|
||||
u64 chain_count = 0;
|
||||
struct sk_buff *head = skb;
|
||||
|
||||
/* Deaggregation and freeing of HW originating
|
||||
* buffers is done within here
|
||||
@@ -1935,8 +1936,14 @@ void rmnet_frag_ingress_handler(struct sk_buff *skb,
|
||||
}
|
||||
}
|
||||
|
||||
skb_frag = skb_shinfo(skb)->frag_list;
|
||||
skb_shinfo(skb)->frag_list = NULL;
|
||||
if (skb == head) {
|
||||
skb_frag = skb_shinfo(skb)->frag_list;
|
||||
skb_shinfo(skb)->frag_list = NULL;
|
||||
} else {
|
||||
skb_frag = skb->next;
|
||||
skb->next = NULL;
|
||||
}
|
||||
|
||||
consume_skb(skb);
|
||||
skb = skb_frag;
|
||||
}
|
||||
|
Reference in New Issue
Block a user