diff options
author | Eric Dumazet <edumazet@google.com> | 2023-03-16 01:10:08 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-03-17 08:52:05 +0000 |
commit | fd53c297aa7b077ae98a3d3d2d3aa278a1686ba6 (patch) | |
tree | 0a62bc12c8fee36cae0ff6ea93f82ea4ab6483cb /net/packet/internal.h | |
parent | ee5675ecdf7a4e713ed21d98a70c2871d6ebed01 (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/internal.h')
-rw-r--r-- | net/packet/internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h index 178cd1852238..3bae8ea7a36f 100644 --- a/net/packet/internal.h +++ b/net/packet/internal.h @@ -118,8 +118,7 @@ struct packet_sock { struct mutex pg_vec_lock; unsigned long flags; unsigned int running; /* bind_lock must be held */ - unsigned int auxdata:1, /* writer must hold sock lock */ - has_vnet_hdr:1, + unsigned int has_vnet_hdr:1, /* writer must hold sock lock */ tp_loss:1, tp_tx_has_off:1; int pressure; @@ -146,6 +145,7 @@ static inline struct packet_sock *pkt_sk(struct sock *sk) enum packet_sock_flags { PACKET_SOCK_ORIGDEV, + PACKET_SOCK_AUXDATA, }; static inline void packet_sock_flag_set(struct packet_sock *po, |