linux-stable/drivers/ptp
Eric Dumazet fa9dac68ce 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:14:55 +00:00
..
Kconfig net: pch_gbe: Allow build on MIPS_GENERIC kernel 2023-06-08 19:18:32 -07:00
Makefile ptp: add ToD device driver for Intel FPGA cards 2023-03-29 21:25:48 -07:00
ptp_chardev.c ptp: annotate data-race around q->head and q->tail 2023-11-28 17:14:55 +00:00
ptp_clock.c ptp: annotate data-race around q->head and q->tail 2023-11-28 17:14:55 +00:00
ptp_clockmatrix.c ptp: ptp_clockmatrix: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_clockmatrix.h ptp: ptp_clockmatrix: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_dfl_tod.c ptp: add ToD device driver for Intel FPGA cards 2023-03-29 21:25:48 -07:00
ptp_dte.c ptp: convert remaining drivers to adjfine interface 2022-11-11 10:58:39 +00:00
ptp_idt82p33.c ptp: idt82p33: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_idt82p33.h ptp: idt82p33: Add .getmaxphase ptp_clock_info callback 2023-06-20 09:02:33 +01:00
ptp_ines.c ptp: ines: drop of_match_ptr for ID table 2023-03-15 21:14:57 -07:00
ptp_kvm_arm.c ptp: kvm: Use decrypted memory in confidential guest on x86 2023-03-17 21:57:52 -07:00
ptp_kvm_common.c ptp: kvm: Use decrypted memory in confidential guest on x86 2023-03-17 21:57:52 -07:00
ptp_kvm_x86.c ptp: kvm: Use decrypted memory in confidential guest on x86 2023-03-17 21:57:52 -07:00
ptp_ocp.c ptp: ocp: Fix error handling in ptp_ocp_device_init 2023-10-10 22:03:01 +02:00
ptp_pch.c ptp_phc: convert .adjfreq to .adjfine 2022-11-11 10:58:39 +00:00
ptp_private.h ptp: annotate data-race around q->head and q->tail 2023-11-28 17:14:55 +00:00
ptp_qoriq.c ptp_qoriq: fix memory leak in probe() 2023-03-24 19:17:22 -07:00
ptp_qoriq_debugfs.c
ptp_sysfs.c ptp: annotate data-race around q->head and q->tail 2023-11-28 17:14:55 +00:00
ptp_vclock.c ptp: vclock: use mutex to fix "sleep on atomic" bug 2023-02-22 21:23:48 -08:00
ptp_vmw.c Networking changes for 6.2. 2022-12-13 15:47:48 -08:00