summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/flamegraph-record
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-08-05 19:28:21 -0700
committerJakub Kicinski <kuba@kernel.org>2026-08-06 09:37:03 -0700
commitd31c14e56a4f01f0689c29c0bcbcd45f65b4a473 (patch)
tree2140c6c7e07b4101036380b6b0d4210fbf4ae78f /tools/perf/scripts/python/bin/flamegraph-record
parent8e63c9e6179ace3033dcd19991f95386e9d3130f (diff)
net: avoid theoretical races with ref drain
Technically, it's illegal to take a ref on a netdev just because we have a pointer on which we already hold a ref, with no other protection. This is because our simple per-cpu refcount implementation cannot atomically read the count. Let's make sure we cancel outstanding work and never queue more work for a device we know is dead. This way taking a ref on a dev we know is on the netdev_work_list is always going to be safe. Jiangshan Yi reports that the issues is caught by ref tracker infra leading to a warning: WARNING: lib/ref_tracker.c:322 at ref_tracker_free WARNING: lib/ref_tracker.c:246 at ref_tracker_dir_exit Reported-by: Jiangshan Yi <yijiangshan@kylinos.cn> Link: https://lore.kernel.org/20260731035135.3917308-2-yijiangshan@kylinos.cn Fixes: 12c765be84d2 ("net: turn the rx_mode work into a generic netdev_work facility") Link: https://patch.msgid.link/20260806022821.2079945-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/flamegraph-record')
0 files changed, 0 insertions, 0 deletions