summaryrefslogtreecommitdiff
path: root/net/packet/diag.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-16 01:10:09 +0000
committerDavid S. Miller <davem@davemloft.net>2023-03-17 08:52:05 +0000
commit1051ce4ab64db91f7b62369ddc321ba8747f8c84 (patch)
treef2a6bf0ebfc9e1c06f12fe4879deb5547baf7128 /net/packet/diag.c
parentfd53c297aa7b077ae98a3d3d2d3aa278a1686ba6 (diff)
net/packet: annotate accesses to po->tp_tstamp
tp_tstamp is read locklessly. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/diag.c')
-rw-r--r--net/packet/diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/diag.c b/net/packet/diag.c
index d704c7bf51b2..0abca32e2f87 100644
--- a/net/packet/diag.c
+++ b/net/packet/diag.c
@@ -18,7 +18,7 @@ static int pdiag_put_info(const struct packet_sock *po, struct sk_buff *nlskb)
pinfo.pdi_version = po->tp_version;
pinfo.pdi_reserve = po->tp_reserve;
pinfo.pdi_copy_thresh = po->copy_thresh;
- pinfo.pdi_tstamp = po->tp_tstamp;
+ pinfo.pdi_tstamp = READ_ONCE(po->tp_tstamp);
pinfo.pdi_flags = 0;
if (po->running)