summaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorJijie Shao <shaojijie@huawei.com>2025-08-06 18:27:57 +0800
committerJakub Kicinski <kuba@kernel.org>2025-08-08 11:48:49 -0700
commit7004b26f0b64331143eb0b312e77a357a11427ce (patch)
tree1af27ae7a5b2d78077e92646695cfc11f7713257 /tools/perf/util/scripting-engines/trace-event-python.c
parentc875503a9b9082928d7d3fc60b5400d16fbfae4e (diff)
net: hibmcge: fix the division by zero issue
When the network port is down, the queue is released, and ring->len is 0. In debugfs, hbg_get_queue_used_num() will be called, which may lead to a division by zero issue. This patch adds a check, if ring->len is 0, hbg_get_queue_used_num() directly returns 0. Fixes: 40735e7543f9 ("net: hibmcge: Implement .ndo_start_xmit function") Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions