summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2025-03-10 17:33:53 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2025-03-14 11:47:00 +0300
commit80b5f90158d1364cbd80ad82852a757fc0692bf2 (patch)
tree24d3095b6f636dfb48c9d5d1432c341ad65358d1 /scripts/generate_rust_analyzer.py
parent1d22a122ffb116c3cf78053e812b8b21f8852ee9 (diff)
downloadlinux-80b5f90158d1364cbd80ad82852a757fc0692bf2.tar.xz
can: statistics: use atomic access in hot path
In can_send() and can_receive() CAN messages and CAN filter matches are counted to be visible in the CAN procfs files. KCSAN detected a data race within can_send() when two CAN frames have been generated by a timer event writing to the same CAN netdevice at the same time. Use atomic operations to access the statistics in the hot path to fix the KCSAN complaint. Reported-by: syzbot+78ce4489b812515d5e4d@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67cd717d.050a0220.e1a89.0006.GAE@google.com Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://patch.msgid.link/20250310143353.3242-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions