diff options
author | Sean Anderson <sean.anderson@linux.dev> | 2025-02-20 19:29:50 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-22 03:31:35 +0300 |
commit | fa52f15c745ce55261b92873676f64f7348cfe82 (patch) | |
tree | 0e466e024bf86dcfa4f0caf9cb18c00168ccce78 /scripts/gdb/linux/utils.py | |
parent | 27843ce6ba3d3122b65066550fe33fb8839f8aef (diff) | |
download | linux-fa52f15c745ce55261b92873676f64f7348cfe82.tar.xz |
net: cadence: macb: Synchronize stats calculations
Stats calculations involve a RMW to add the stat update to the existing
value. This is currently not protected by any synchronization mechanism,
so data races are possible. Add a spinlock to protect the update. The
reader side could be protected using u64_stats, but we would still need
a spinlock for the update side anyway. And we always do an update
immediately before reading the stats anyway.
Fixes: 89e5785fc8a6 ("[PATCH] Atmel MACB ethernet driver")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://patch.msgid.link/20250220162950.95941-1-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions