android_kernel_xiaomi_sm8450/drivers/ptp
Eric Dumazet 1f368fd612 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:54:54 +00:00
..
idt8a340_reg.h ptp: ptp_clockmatrix: update to support 4.8.7 firmware 2020-07-30 16:46:59 -07:00
Kconfig ptp_pch: Restore dependency on PCI 2021-08-26 08:35:46 -04:00
Makefile
ptp_chardev.c ptp: annotate data-race around q->head and q->tail 2023-11-28 16:54:54 +00:00
ptp_clock.c ptp: annotate data-race around q->head and q->tail 2023-11-28 16:54:54 +00:00
ptp_clockmatrix.c ptp: clockmatrix: bug fix for idtcm_strverscmp 2020-11-25 17:24:49 -08:00
ptp_clockmatrix.h ptp: ptp_clockmatrix: use i2c_master_send for i2c write 2020-08-19 16:23:22 -07:00
ptp_dte.c
ptp_idt82p33.c
ptp_idt82p33.h
ptp_ines.c ptp: ptp_ines: Remove redundant null check 2020-08-26 07:08:59 -07:00
ptp_kvm.c
ptp_pch.c ptp_pch: Load module automatically if ID matches 2021-10-13 10:04:27 +02:00
ptp_private.h ptp: annotate data-race around q->head and q->tail 2023-11-28 16:54:54 +00:00
ptp_qoriq_debugfs.c
ptp_qoriq.c ptp_qoriq: fix memory leak in probe() 2023-04-05 11:23:47 +02:00
ptp_sysfs.c ptp: annotate data-race around q->head and q->tail 2023-11-28 16:54:54 +00:00
ptp_vmw.c