summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorGuanglei Zhu <zhugl3@xiaopeng.com>2026-09-11 10:17:32 +0800
committerJakub Kicinski <kuba@kernel.org>2026-09-16 18:58:45 -0700
commit5d063822ac5184939c1ed377a339a01d8ae814e8 (patch)
treedc1e4b225ebf452ca0e1df1851c763a099fed31a /tools/perf/scripts/python/stackcollapse.py
parent1dd85662fee6e2ac580b1c4f9a0c0a7ae6e31f0e (diff)
downloadlinux-next-5d063822ac5184939c1ed377a339a01d8ae814e8.tar.gz
linux-next-5d063822ac5184939c1ed377a339a01d8ae814e8.zip
net: wwan: mhi_wwan_mbim: guard against a cyclic NDP chain
The NDP traversal in mhi_mbim_rx() only stops when wNextNdpIndex is zero. Nothing requires the offsets to advance, so a modem that points an NDP at itself, or at an earlier NDP, keeps the loop spinning forever on one CPU. Break out when the next NDP offset is not larger than the current one. Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver") Cc: stable@vger.kernel.org Suggested-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Guanglei Zhu <zhugl3@xiaopeng.com> Verified in a QEMU guest with a fault injector feeding the driver's receive callback an NTB whose single NDP points at itself: the unpatched driver spins in mhi_mbim_rx() with one CPU pinned at 100% and the thread never returns. With this check the loop terminates within one iteration. Changes in v2: move the non-increasing check to the wNextNdpIndex retrieval site, as suggested by Loic Poulain, instead of tracking the previous offset in a separate variable. Link: https://patch.msgid.link/20260911021734.1396599-1-zhugl3@xiaopeng.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions