android_kernel_motorola_sm6375/net/can
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Oliver Hartkopp 12d344d74c can: statistics: use atomic access in hot path
[ Upstream commit 80b5f90158d1364cbd80ad82852a757fc0692bf2 ]

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: [email protected]
Closes: https://lore.kernel.org/all/[email protected]
Signed-off-by: Oliver Hartkopp <[email protected]>
Reviewed-by: Vincent Mailhol <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-04-10 14:29:42 +02:00
..
j1939 can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero 2025-03-13 12:43:16 +01:00
af_can.c can: statistics: use atomic access in hot path 2025-04-10 14:29:42 +02:00
af_can.h can: statistics: use atomic access in hot path 2025-04-10 14:29:42 +02:00
bcm.c can: bcm: Clear bo->bcm_proc_read after remove_proc_entry(). 2024-11-08 16:20:27 +01:00
gw.c
Kconfig
Makefile
proc.c can: statistics: use atomic access in hot path 2025-04-10 14:29:42 +02:00
raw.c can: raw: add support for SO_MARK 2024-01-15 18:25:25 +01:00