Skip to content
Commit 73bde5a3 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

ptp: annotate data-race around q->head and q->tail

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: d94ba80e

 ("ptp: Added a brand new class driver for ptp clocks.")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/20231109174859.3995880-1-edumazet@google.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4b3812d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment