summaryrefslogtreecommitdiff
path: root/net/packet/diag.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-16 01:10:08 +0000
committerDavid S. Miller <davem@davemloft.net>2023-03-17 08:52:05 +0000
commitfd53c297aa7b077ae98a3d3d2d3aa278a1686ba6 (patch)
tree0a62bc12c8fee36cae0ff6ea93f82ea4ab6483cb /net/packet/diag.c
parentee5675ecdf7a4e713ed21d98a70c2871d6ebed01 (diff)
net/packet: convert po->auxdata to an atomic flag
po->auxdata can be read while another thread is changing its value, potentially raising KCSAN splat. Convert it to PACKET_SOCK_AUXDATA flag. Fixes: 8dc419447415 ("[PACKET]: Add optional checksum computation for recvmsg") 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 e1ac9bb375b3..d704c7bf51b2 100644
--- a/net/packet/diag.c
+++ b/net/packet/diag.c
@@ -23,7 +23,7 @@ static int pdiag_put_info(const struct packet_sock *po, struct sk_buff *nlskb)
pinfo.pdi_flags = 0;
if (po->running)
pinfo.pdi_flags |= PDI_RUNNING;
- if (po->auxdata)
+ if (packet_sock_flag(po, PACKET_SOCK_AUXDATA))
pinfo.pdi_flags |= PDI_AUXDATA;
if (packet_sock_flag(po, PACKET_SOCK_ORIGDEV))
pinfo.pdi_flags |= PDI_ORIGDEV;