diff options
author | Eric Dumazet <edumazet@google.com> | 2021-09-28 03:29:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-28 15:21:16 +0300 |
commit | a9f5970767d11eadc805d5283f202612c7ba1f59 (patch) | |
tree | 8d89295bb3d1e3de62bb0a8f025d5a4ccee63a24 /net/ipv6 | |
parent | 103bde372f084206c6972be543ecc247ebbff9f3 (diff) | |
download | linux-a9f5970767d11eadc805d5283f202612c7ba1f59.tar.xz |
net: udp: annotate data race around udp_sk(sk)->corkflag
up->corkflag field can be read or written without any lock.
Annotate accesses to avoid possible syzbot/KCSAN reports.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index ea53847b5b7e..e505bb007e9f 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1303,7 +1303,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) int addr_len = msg->msg_namelen; bool connected = false; int ulen = len; - int corkreq = up->corkflag || msg->msg_flags&MSG_MORE; + int corkreq = READ_ONCE(up->corkflag) || msg->msg_flags&MSG_MORE; int err; int is_udplite = IS_UDPLITE(sk); int (*getfrag)(void *, char *, int, int, int, struct sk_buff *); |