android_kernel_motorola_sm6225/drivers/ptp
Eric Dumazet 9b22b6cce4 ptp: annotate data-race around q->head and q->tail
[ Upstream commit 73bde5a3294853947252cd9092a3517c7cb0cd2d ]

As I was working on a syzbot report, I found that KCSAN would
probably complain that reading q->head or q->tail without
barriers could lead to invalid results.

Add corresponding READ_ONCE() and WRITE_ONCE() to avoid
load-store tearing.

Fixes: d94ba80ebb ("ptp: Added a brand new class driver for ptp clocks.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/20231109174859.3995880-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 16:46:33 +00:00
..
Kconfig ptp_pch: Restore dependency on PCI 2021-08-26 08:36:46 -04:00
Makefile
ptp_chardev.c ptp: annotate data-race around q->head and q->tail 2023-11-28 16:46:33 +00:00
ptp_clock.c ptp: annotate data-race around q->head and q->tail 2023-11-28 16:46:33 +00:00
ptp_dte.c
ptp_ixp46x.c
ptp_kvm.c
ptp_pch.c ptp_pch: Load module automatically if ID matches 2021-10-13 10:10:51 +02:00
ptp_private.h ptp: annotate data-race around q->head and q->tail 2023-11-28 16:46:33 +00:00
ptp_qoriq.c ptp_qoriq: use div_u64/div_u64_rem for 64-bit division 2018-08-06 10:43:35 -07:00
ptp_sysfs.c ptp: annotate data-race around q->head and q->tail 2023-11-28 16:46:33 +00:00