Skip to content

udp: round of data-races fixes

Eric Dumazet netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyApplied 10/10

Patches in v1 All 10 applied

#Subject and filesSizeRepliesApplied
1/10udp: introduce udp->udp_flagsinclude/linux/udp.h net/ipv4/udp.c net/ipv6/udp.c+30 -160 repliesApplied
2/10udp: move udp->no_check6_tx to udp->udp_flagsinclude/linux/udp.h net/ipv4/udp.c net/ipv6/udp.c+9 -90 repliesApplied
3/10udp: move udp->no_check6_rx to udp->udp_flagsinclude/linux/udp.h net/ipv4/udp.c net/ipv6/udp.c+10 -100 repliesApplied
4/10udp: move udp->gro_enabled to udp->udp_flagsinclude/linux/udp.h net/ipv4/udp.c net/ipv4/udp_offload.c +1 more+7 -70 repliesApplied
5/10udp: add missing WRITE_ONCE() around up->encap_rcvnet/ipv4/udp.c+4 -20 repliesApplied
6/10udp: move udp->accept_udp_{l4|fraglist} to udp->udp_flagsinclude/linux/udp.h net/ipv4/udp.c+10 -80 repliesApplied
7/10udp: lockless UDP_ENCAP_L2TPINUDP / UDP_GROinclude/linux/udp.h include/net/udp_tunnel.h net/ipv4/udp.c +2 more+12 -200 repliesApplied
8/10udp: annotate data-races around udp->encap_typedrivers/net/gtp.c net/ipv4/udp.c net/ipv4/xfrm4_input.c +3 more+17 -150 repliesApplied
9/10udplite: remove UDPLITE_BITinclude/linux/udp.h net/ipv4/udplite.c net/ipv6/udplite.c+2 -50 repliesApplied
10/10udplite: fix various data-racesinclude/linux/udp.h include/net/udplite.h net/ipv4/udp.c +1 more+27 -230 repliesApplied

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWillem de Bruijn
SeriesR-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 00/10] udp: round of data-races fixes

This series is inspired by multiple syzbot reports.

Many udp fields reads or writes are racy.

Add a proper udp->udp_flags and move there all
flags needing atomic safety.

Also add missing READ_ONCE()/WRITE_ONCE() when
lockless readers need access to specific fields.

Eric Dumazet (10):
udp: introduce udp->udp_flags
udp: move udp->no_check6_tx to udp->udp_flags
udp: move udp->no_check6_rx to udp->udp_flags
udp: move udp->gro_enabled to udp->udp_flags
udp: add missing WRITE_ONCE() around up->encap_rcv
udp: move udp->accept_udp_{l4|fraglist} to udp->udp_flags
udp: lockless UDP_ENCAP_L2TPINUDP / UDP_GRO
udp: annotate data-races around udp->encap_type
udplite: remove UDPLITE_BIT
udplite: fix various data-races

 drivers/net/gtp.c          |  4 +--
 include/linux/udp.h        | 66 ++++++++++++++++++++--------------
 include/net/udp_tunnel.h   |  9 ++---
 include/net/udplite.h      | 14 +++++---
 net/ipv4/udp.c             | 74 +++++++++++++++++++-------------------
 net/ipv4/udp_offload.c     |  4 +--
 net/ipv4/udp_tunnel_core.c |  2 +-
 net/ipv4/udplite.c         |  1 -
 net/ipv4/xfrm4_input.c     |  4 +--
 net/ipv6/udp.c             | 34 +++++++++---------
 net/ipv6/udplite.c         |  1 -
 net/ipv6/xfrm6_input.c     |  4 +--
 net/l2tp/l2tp_core.c       |  6 ++--
 13 files changed, 118 insertions(+), 105 deletions(-)
Signature · 1 line
2.42.0.283.g2d96d420d3-goog