Skip to content

net: sysctl: Fix data-races around net.core.XXX

Kuniyuki Iwashima netdev 4 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest17 patches 0 repliesApplied 17/17
  2. v317 patches 10 repliesSuperseded
  3. v217 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v115 patches4 repliesSuperseded

Changes in v4 from the cover letter

* Add mutex in patch 2
* Add comments in patch 5

Patches in v4 All 17 applied

#Subject and filesSizeRepliesApplied
1/17net: Fix data-races around sysctl_[rw]mem_(max|default).net/core/filter.c net/core/sock.c net/ipv4/ip_output.c +2 more+10 -100 repliesApplied
2/17net: Fix data-races around weight_p and dev_weight_[rt]x_bias.net/core/dev.c net/core/sysctl_net_core.c net/sched/sch_generic.c+11 -80 repliesApplied
3/17net: Fix data-races around netdev_max_backlog.Documentation/admin-guide/sysctl/net.rst net/core/dev.c net/core/gro_cells.c +2 more+6 -60 repliesApplied
4/17net: Fix data-races around netdev_tstamp_prequeue.net/core/dev.c+4 -40 repliesApplied
5/17ratelimit: Fix data-races in ___ratelimit().lib/ratelimit.c+9 -30 repliesApplied
6/17net: Fix data-races around sysctl_optmem_max.net/core/bpf_sk_storage.c net/core/filter.c net/core/sock.c +2 more+18 -140 repliesApplied
7/17net: Fix a data-race around sysctl_tstamp_allow_data.net/core/skbuff.c+1 -10 repliesApplied
8/17net: Fix a data-race around sysctl_net_busy_poll.include/net/busy_poll.h+1 -10 repliesApplied
9/17net: Fix a data-race around sysctl_net_busy_read.net/core/sock.c+1 -10 repliesApplied
10/17net: Fix a data-race around netdev_budget.net/core/dev.c+1 -10 repliesApplied
11/17net: Fix data-races around sysctl_max_skb_frags.net/ipv4/tcp.c net/mptcp/protocol.c+3 -30 repliesApplied
12/17net: Fix a data-race around netdev_budget_usecs.net/core/dev.c+1 -10 repliesApplied
13/17net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.include/linux/netdevice.h+8 -30 repliesApplied
14/17net: Fix data-races around sysctl_devconf_inherit_init_net.include/linux/netdevice.h net/ipv4/devinet.c net/ipv6/addrconf.c+21 -90 repliesApplied
15/17net: Fix a data-race around gro_normal_batch.include/net/gro.h+1 -10 repliesApplied
16/17net: Fix a data-race around netdev_unregister_timeout_secs.net/core/dev.c+1 -10 repliesApplied
17/17net: Fix a data-race around sysctl_somaxconn.net/socket.c+1 -10 repliesApplied

Reviews trailers per patch

2 of 17 patches have a Reviewed-by or Acked-by.

PatchDmitry VyukovEdward Cree
1/17
2/17
3/17
4/17
5/17
6/17
7/17
8/17
9/17
10/17
11/17
12/17
13/17
14/17
15/17A-b
16/17A-b
17/17

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

Read the v4 thread

Cover letter [PATCH v4 net 00/17] net: sysctl: Fix data-races around net.core.XXX

This series fixes data-races around all knobs in net_core_table and netns_core_table except for bpf stuff.

These knobs are skipped:

- 4 bpf knobs
- netdev_rss_key: Written only once by net_get_random_once() and read-only knob
- rps_sock_flow_entries: Protected with sock_flow_mutex
- flow_limit_cpu_bitmap: Protected with flow_limit_update_mutex
- flow_limit_table_len: Protected with flow_limit_update_mutex
- default_qdisc: Protected with qdisc_mod_lock
- warnings: Unused
- high_order_alloc_disable: Protected with static_key_mutex
- skb_defer_max: Already using READ_ONCE()
- sysctl_txrehash: Already using READ_ONCE()

Note 5th patch fixes net.core.message_cost and net.core.message_burst, and lib/ratelimit.c does not have an explicit maintainer.

Changes:
v4:
* Add mutex in patch 2
* Add comments in patch 5

v3: https://lore.kernel.org/netdev/[email protected]/
* Fix build failures of CONFIG_SYSCTL=n case in 13th & 14th patches

v2: https://lore.kernel.org/netdev/[email protected]/
* Remove 4 bpf knobs and added 6 knobs

v1: https://lore.kernel.org/netdev/[email protected]/

Kuniyuki Iwashima (17):
net: Fix data-races around sysctl_[rw]mem_(max|default).
net: Fix data-races around weight_p and dev_weight_[rt]x_bias.
net: Fix data-races around netdev_max_backlog.
net: Fix data-races around netdev_tstamp_prequeue.
ratelimit: Fix data-races in ___ratelimit().
net: Fix data-races around sysctl_optmem_max.
net: Fix a data-race around sysctl_tstamp_allow_data.
net: Fix a data-race around sysctl_net_busy_poll.
net: Fix a data-race around sysctl_net_busy_read.
net: Fix a data-race around netdev_budget.
net: Fix data-races around sysctl_max_skb_frags.
net: Fix a data-race around netdev_budget_usecs.
net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.
net: Fix data-races around sysctl_devconf_inherit_init_net.
net: Fix a data-race around gro_normal_batch.
net: Fix a data-race around netdev_unregister_timeout_secs.
net: Fix a data-race around sysctl_somaxconn.

 Documentation/admin-guide/sysctl/net.rst |  2 +-
 include/linux/netdevice.h                | 20 +++++++++++++++++---
 include/net/busy_poll.h                  |  2 +-
 include/net/gro.h                        |  2 +-
 lib/ratelimit.c                          | 12 +++++++++---
 net/core/bpf_sk_storage.c                |  5 +++--
 net/core/dev.c                           | 20 ++++++++++----------
 net/core/filter.c                        | 13 +++++++------
 net/core/gro_cells.c                     |  2 +-
 net/core/skbuff.c                        |  2 +-
 net/core/sock.c                          | 18 ++++++++++--------
 net/core/sysctl_net_core.c               | 15 +++++++++------
 net/ipv4/devinet.c                       | 16 ++++++++++------
 net/ipv4/ip_output.c                     |  2 +-
 net/ipv4/ip_sockglue.c                   |  6 +++---
 net/ipv4/tcp.c                           |  4 ++--
 net/ipv4/tcp_output.c                    |  2 +-
 net/ipv6/addrconf.c                      |  5 ++---
 net/ipv6/ipv6_sockglue.c                 |  4 ++--
 net/mptcp/protocol.c                     |  2 +-
 net/netfilter/ipvs/ip_vs_sync.c          |  4 ++--
 net/sched/sch_generic.c                  |  2 +-
 net/socket.c                             |  2 +-
 net/xfrm/espintcp.c                      |  2 +-
 net/xfrm/xfrm_input.c                    |  2 +-
 25 files changed, 98 insertions(+), 68 deletions(-)
Signature · 1 line
2.30.2