Skip to content

ipv6: 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 Latest14 patches 15 repliesApplied 14/14

Patches in v1 All 14 applied

#Subject and filesSizeRepliesApplied
1/14ipv6: lockless IPV6_UNICAST_HOPS implementationinclude/linux/ipv6.h include/net/ipv6.h net/ipv6/ip6_output.c +3 more+16 -241 replyApplied
2/14ipv6: lockless IPV6_MULTICAST_LOOP implementationinclude/linux/ipv6.h include/net/inet_sock.h include/net/sock.h +5 more+30 -251 replyApplied
3/14ipv6: lockless IPV6_MULTICAST_HOPS implementationinclude/linux/ipv6.h include/net/ipv6.h net/dccp/ipv6.c +3 more+21 -251 replyApplied
4/14ipv6: lockless IPV6_MTU implementationnet/ipv6/ip6_output.c net/ipv6/ipv6_sockglue.c+18 -161 replyApplied
5/14ipv6: lockless IPV6_MINHOPCOUNT implementationnet/ipv6/ipv6_sockglue.c+15 -161 replyApplied
6/14ipv6: lockless IPV6_RECVERR_RFC4884 implementationinclude/linux/ipv6.h include/net/inet_sock.h net/ipv6/datagram.c +1 more+10 -111 replyApplied
7/14ipv6: lockless IPV6_MULTICAST_ALL implementationinclude/linux/ipv6.h include/net/inet_sock.h net/ipv6/af_inet6.c +2 more+9 -111 replyApplied
8/14ipv6: lockless IPV6_AUTOFLOWLABEL implementationinclude/linux/ipv6.h include/net/inet_sock.h include/net/ipv6.h +2 more+13 -161 replyApplied
9/14ipv6: lockless IPV6_DONTFRAG implementationinclude/linux/ipv6.h include/net/inet_sock.h include/net/ipv6.h +8 more+16 -171 replyApplied
10/14ipv6: lockless IPV6_RECVERR implemetationinclude/linux/ipv6.h include/net/inet_sock.h include/net/ipv6.h +8 more+25 -321 replyApplied
11/14ipv6: move np->repflow to atomic flagsinclude/linux/ipv6.h include/net/inet_sock.h net/dccp/ipv6.c +3 more+14 -151 replyApplied
12/14ipv6: lockless IPV6_ROUTER_ALERT_ISOLATE implementationinclude/linux/ipv6.h include/net/inet_sock.h net/ipv6/ip6_output.c +1 more+9 -111 replyApplied
13/14ipv6: lockless IPV6_MTU_DISCOVER implementationinclude/linux/ipv6.h include/net/ip6_route.h net/ipv6/ip6_output.c +4 more+24 -221 replyApplied
14/14ipv6: lockless IPV6_FLOWINFO_SEND implementationinclude/linux/ipv6.h include/net/inet_sock.h net/dccp/ipv6.c +10 more+23 -231 replyApplied

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSimon HormanDavid Ahern
SeriesR-b
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-b

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/14] ipv6: round of data-races fixes

This series is inspired by one related syzbot report.

Many inet6_sk(sk) fields reads or writes are racy.

Move 1-bit fields to inet->inet_flags to provide atomic safety. inet6_{test|set|clear|assign}_bit() helpers could be changed later if we need to make room in inet_flags.

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

np->srcprefs will be handled separately to avoid merge conflicts because a prior patch was posted for net tree.

Eric Dumazet (14):
ipv6: lockless IPV6_UNICAST_HOPS implementation
ipv6: lockless IPV6_MULTICAST_LOOP implementation
ipv6: lockless IPV6_MULTICAST_HOPS implementation
ipv6: lockless IPV6_MTU implementation
ipv6: lockless IPV6_MINHOPCOUNT implementation
ipv6: lockless IPV6_RECVERR_RFC4884 implementation
ipv6: lockless IPV6_MULTICAST_ALL implementation
ipv6: lockless IPV6_AUTOFLOWLABEL implementation
ipv6: lockless IPV6_DONTFRAG implementation
ipv6: lockless IPV6_RECVERR implemetation
ipv6: move np->repflow to atomic flags
ipv6: lockless IPV6_ROUTER_ALERT_ISOLATE implementation
ipv6: lockless IPV6_MTU_DISCOVER implementation
ipv6: lockless IPV6_FLOWINFO_SEND implementation

 include/linux/ipv6.h            |  49 +++----
 include/net/inet_sock.h         |  10 ++
 include/net/ip6_route.h         |  14 +-
 include/net/ipv6.h              |  16 +--
 include/net/sock.h              |   2 +-
 include/net/xfrm.h              |   2 +-
 net/core/sock.c                 |   4 +-
 net/dccp/ipv6.c                 |   8 +-
 net/ipv4/ping.c                 |   5 +-
 net/ipv6/af_inet6.c             |   9 +-
 net/ipv6/datagram.c             |  15 +--
 net/ipv6/icmp.c                 |   4 +-
 net/ipv6/ip6_flowlabel.c        |   8 +-
 net/ipv6/ip6_output.c           |  42 +++---
 net/ipv6/ipv6_sockglue.c        | 223 +++++++++++++++-----------------
 net/ipv6/mcast.c                |   4 +-
 net/ipv6/ndisc.c                |   4 +-
 net/ipv6/ping.c                 |   4 +-
 net/ipv6/raw.c                  |  16 +--
 net/ipv6/tcp_ipv6.c             |  21 ++-
 net/ipv6/udp.c                  |  12 +-
 net/l2tp/l2tp_ip6.c             |   6 +-
 net/netfilter/ipvs/ip_vs_sync.c |  12 +-
 net/sctp/ipv6.c                 |   7 +-
 24 files changed, 238 insertions(+), 259 deletions(-)
Signature · 1 line
2.42.0.283.g2d96d420d3-goog