summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-09-12 12:17:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-10 19:10:28 +0300
commit753886c0b994f66925cc3eaa3dc9b161d4e17827 (patch)
tree532b33356f5e80601f7b333ac3a4c503f8a8ecc9 /include
parenta01cff15ccdc3b71b217f8776a84f3c5e136ea0b (diff)
downloadlinux-753886c0b994f66925cc3eaa3dc9b161d4e17827.tar.xz
udp: move udp->gro_enabled to udp->udp_flags
[ Upstream commit e1dc0615c6b08ef36414f08c011965b8fb56198b ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-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 e6cd46e2b083..f87e2123fe7b 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -34,6 +34,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 {
@@ -52,7 +53,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: */