kernel_samsung_a53x/drivers/ptp
Eric Dumazet a3382ab853 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: d94ba80ebbea ("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>
2024-11-18 11:43:19 +01:00
..
idt8a340_reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_chardev.c ptp: annotate data-race around q->head and q->tail 2024-11-18 11:43:19 +01:00
ptp_clock.c ptp: annotate data-race around q->head and q->tail 2024-11-18 11:43:19 +01:00
ptp_clockmatrix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_clockmatrix.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_dte.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_idt82p33.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_idt82p33.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_ines.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_kvm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_pch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_private.h ptp: annotate data-race around q->head and q->tail 2024-11-18 11:43:19 +01:00
ptp_qoriq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_qoriq_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp_sysfs.c ptp: annotate data-race around q->head and q->tail 2024-11-18 11:43:19 +01:00
ptp_vmw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00