summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>2026-09-24 23:39:36 -0700
committerDavid S. Miller <davem@davemloft.net>2026-09-30 10:27:59 +0100
commit99b43ede9e355ba35244cc9470bf1819774ce39d (patch)
tree1453a5a0e4b07d4754a8b7fc912f5da209d14d07 /tools/perf/scripts/python/stackcollapse.py
parent2e7ea988a03273f7add64218fbaf28d96c963062 (diff)
downloadlinux-99b43ede9e355ba35244cc9470bf1819774ce39d.tar.gz
linux-99b43ede9e355ba35244cc9470bf1819774ce39d.zip
net: microchip: vcap: stop scanning after deleting key field
The only call outside the KUnit tests is in sparx5_tc_add_rule_copy(), which passes a fixed key list with no duplicate entries. Therefore, the potential double-free is not currently reachable in tree. However, vcap_filter_rule_keys() is exported and does not require its key list entries to be unique. If a future or external caller supplies the same key at another position that the inner loop visits, it calls list_del() and kfree() a second time on the freed field, leading to a potential double-free. Break the inner loop after removing a matching field. The outer safe list traversal continues to process the remaining rule fields. Fixes: 465a38a269e9 ("net: microchip: sparx5: Support for copying and modifying rules in the API") Reported-by: Dan Carpenter <error27@gmail.com> Closes: https://lore.kernel.org/all/ahs-lCAXXikkaHky@stanley.mountain/ Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions