summaryrefslogtreecommitdiff
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-09-12 12:17:24 +0300
committerPaolo Abeni <pabeni@redhat.com>2023-09-14 17:16:36 +0300
commite1dc0615c6b08ef36414f08c011965b8fb56198b (patch)
tree146013171a93e03ec8d322c189bd82fc615922ab /include/linux/udp.h
parentbcbc1b1de884647aa0318bf74eb7f293d72a1e40 (diff)
downloadlinux-e1dc0615c6b08ef36414f08c011965b8fb56198b.tar.xz
udp: move udp->gro_enabled to udp->udp_flags
syzbot reported that udp->gro_enabled can be read locklessly. Use one atomic bit from udp->udp_flags. Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 8d4c3835b1b2..b344bd2e41fc 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -36,6 +36,7 @@ enum {
UDP_FLAGS_CORK, /* Cork is required */
UDP_FLAGS_NO_CHECK6_TX, /* Send zero UDP6 checksums on TX? */
UDP_FLAGS_NO_CHECK6_RX, /* Allow zero UDP6 checksums on RX? */
+ UDP_FLAGS_GRO_ENABLED, /* Request GRO aggregation */
};
struct udp_sock {
@@ -54,7 +55,6 @@ struct udp_sock {
* different encapsulation layer set
* this
*/
- gro_enabled:1, /* Request GRO aggregation */
accept_udp_l4:1,
accept_udp_fraglist:1;
/* indicator bits used by pcflag: */