linux-stable/drivers/ptp
Eric Dumazet f84846731b ptp: annotate data-race around q->head and q->tail
[ Upstream commit 73bde5a329 ]

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 17:07:05 +00:00
..
Kconfig
Makefile
ptp_chardev.c ptp: annotate data-race around q->head and q->tail 2023-11-28 17:07:05 +00:00
ptp_clock.c ptp: annotate data-race around q->head and q->tail 2023-11-28 17:07:05 +00:00
ptp_clockmatrix.c
ptp_clockmatrix.h
ptp_dte.c
ptp_idt82p33.c
ptp_idt82p33.h
ptp_ines.c
ptp_kvm_arm.c
ptp_kvm_common.c
ptp_kvm_x86.c
ptp_ocp.c ptp: ocp: Fix error handling in ptp_ocp_device_init 2023-10-10 22:00:42 +02:00
ptp_pch.c
ptp_private.h ptp: annotate data-race around q->head and q->tail 2023-11-28 17:07:05 +00:00
ptp_qoriq.c
ptp_qoriq_debugfs.c
ptp_sysfs.c ptp: annotate data-race around q->head and q->tail 2023-11-28 17:07:05 +00:00
ptp_vclock.c
ptp_vmw.c