Skip to content

Commit ff33952

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix object leak on IPSEC offload failure, from Steffen Klassert. 2) Fix range checks in ipset address range addition operations, from Jozsef Kadlecsik. 3) Fix pernet ops unregistration order in ipset, from Florian Westphal. 4) Add missing netlink attribute policy for nl80211 packet pattern attrs, from Peng Xu. 5) Fix PPP device destruction race, from Guillaume Nault. 6) Write marks get lost when BPF verifier processes R1=R2 register assignments, causing incorrect liveness information and less state pruning. Fix from Alexei Starovoitov. 7) Fix blockhole routes so that they are marked dead and therefore not cached in sockets, otherwise IPSEC stops working. From Steffen Klassert. 8) Fix broadcast handling of UDP socket early demux, from Paolo Abeni. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (37 commits) cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan net: thunderx: mark expected switch fall-throughs in nicvf_main() udp: fix bcast packet reception netlink: do not set cb_running if dump's start() errs ipv4: Fix traffic triggered IPsec connections. ipv6: Fix traffic triggered IPsec connections. ixgbe: incorrect XDP ring accounting in ethtool tx_frame param net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Revert commit 1a8b6d7 ("net:add one common config...") ixgbe: fix masking of bits read from IXGBE_VXLANCTRL register ixgbe: Return error when getting PHY address if PHY access is not supported netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1' netfilter: SYNPROXY: skip non-tcp packet in {ipv4, ipv6}_synproxy_hook tipc: Unclone message at secondary destination lookup tipc: correct initialization of skb list gso: fix payload length when gso_size is zero mlxsw: spectrum_router: Avoid expensive lookup during route removal bpf: fix liveness marking doc: Fix typo "8023.ad" in bonding documentation ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real ...
2 parents 68ebe3c + fdfbad3 commit ff33952

54 files changed

Lines changed: 211 additions & 164 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/networking/bonding.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2387,7 +2387,7 @@ broadcast: Like active-backup, there is not much advantage to this
23872387
and packet type ID), so in a "gatewayed" configuration, all
23882388
outgoing traffic will generally use the same device. Incoming
23892389
traffic may also end up on a single device, but that is
2390-
dependent upon the balancing policy of the peer's 8023.ad
2390+
dependent upon the balancing policy of the peer's 802.3ad
23912391
implementation. In a "local" configuration, traffic will be
23922392
distributed across the devices in the bond.
23932393

‎arch/Kconfig‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,6 @@ config STRICT_MODULE_RWX
937937
and non-text memory will be made non-executable. This provides
938938
protection against certain security exploits (e.g. writing to text)
939939

940-
config ARCH_WANT_RELAX_ORDER
941-
bool
942-
943940
config ARCH_HAS_REFCOUNT
944941
bool
945942
help

‎arch/sparc/Kconfig‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ config SPARC
4444
select ARCH_HAS_SG_CHAIN
4545
select CPU_NO_EFFICIENT_FFS
4646
select LOCKDEP_SMALL if LOCKDEP
47-
select ARCH_WANT_RELAX_ORDER
4847

4948
config SPARC32
5049
def_bool !64BIT

‎drivers/net/ethernet/cavium/thunder/nicvf_main.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,10 @@ static inline bool nicvf_xdp_rx(struct nicvf *nic, struct bpf_prog *prog,
565565
return true;
566566
default:
567567
bpf_warn_invalid_xdp_action(action);
568+
/* fall through */
568569
case XDP_ABORTED:
569570
trace_xdp_exception(nic->netdev, prog, action);
571+
/* fall through */
570572
case XDP_DROP:
571573
/* Check if it's a recycled page, if not
572574
* unmap the DMA mapping.

‎drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -175,31 +175,9 @@ static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw)
175175
**/
176176
static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw)
177177
{
178-
#ifndef CONFIG_SPARC
179-
u32 regval;
180-
u32 i;
181-
#endif
182178
s32 ret_val;
183179

184180
ret_val = ixgbe_start_hw_generic(hw);
185-
186-
#ifndef CONFIG_SPARC
187-
/* Disable relaxed ordering */
188-
for (i = 0; ((i < hw->mac.max_tx_queues) &&
189-
(i < IXGBE_DCA_MAX_QUEUES_82598)); i++) {
190-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i));
191-
regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
192-
IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), regval);
193-
}
194-
195-
for (i = 0; ((i < hw->mac.max_rx_queues) &&
196-
(i < IXGBE_DCA_MAX_QUEUES_82598)); i++) {
197-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i));
198-
regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN |
199-
IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
200-
IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
201-
}
202-
#endif
203181
if (ret_val)
204182
return ret_val;
205183

‎drivers/net/ethernet/intel/ixgbe/ixgbe_common.c‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -366,25 +366,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
366366
}
367367
IXGBE_WRITE_FLUSH(hw);
368368

369-
#ifndef CONFIG_ARCH_WANT_RELAX_ORDER
370-
/* Disable relaxed ordering */
371-
for (i = 0; i < hw->mac.max_tx_queues; i++) {
372-
u32 regval;
373-
374-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i));
375-
regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
376-
IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval);
377-
}
378-
379-
for (i = 0; i < hw->mac.max_rx_queues; i++) {
380-
u32 regval;
381-
382-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i));
383-
regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN |
384-
IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
385-
IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
386-
}
387-
#endif
388369
return 0;
389370
}
390371

‎drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
10481048
{
10491049
struct ixgbe_adapter *adapter = netdev_priv(netdev);
10501050
struct ixgbe_ring *temp_ring;
1051-
int i, err = 0;
1051+
int i, j, err = 0;
10521052
u32 new_rx_count, new_tx_count;
10531053

10541054
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
@@ -1085,8 +1085,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
10851085
}
10861086

10871087
/* allocate temporary buffer to store rings in */
1088-
i = max_t(int, adapter->num_tx_queues, adapter->num_rx_queues);
1089-
i = max_t(int, i, adapter->num_xdp_queues);
1088+
i = max_t(int, adapter->num_tx_queues + adapter->num_xdp_queues,
1089+
adapter->num_rx_queues);
10901090
temp_ring = vmalloc(i * sizeof(struct ixgbe_ring));
10911091

10921092
if (!temp_ring) {
@@ -1118,8 +1118,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
11181118
}
11191119
}
11201120

1121-
for (i = 0; i < adapter->num_xdp_queues; i++) {
1122-
memcpy(&temp_ring[i], adapter->xdp_ring[i],
1121+
for (j = 0; j < adapter->num_xdp_queues; j++, i++) {
1122+
memcpy(&temp_ring[i], adapter->xdp_ring[j],
11231123
sizeof(struct ixgbe_ring));
11241124

11251125
temp_ring[i].count = new_tx_count;
@@ -1139,10 +1139,10 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
11391139
memcpy(adapter->tx_ring[i], &temp_ring[i],
11401140
sizeof(struct ixgbe_ring));
11411141
}
1142-
for (i = 0; i < adapter->num_xdp_queues; i++) {
1143-
ixgbe_free_tx_resources(adapter->xdp_ring[i]);
1142+
for (j = 0; j < adapter->num_xdp_queues; j++, i++) {
1143+
ixgbe_free_tx_resources(adapter->xdp_ring[j]);
11441144

1145-
memcpy(adapter->xdp_ring[i], &temp_ring[i],
1145+
memcpy(adapter->xdp_ring[j], &temp_ring[i],
11461146
sizeof(struct ixgbe_ring));
11471147
}
11481148

‎drivers/net/ethernet/intel/ixgbe/ixgbe_main.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4881,7 +4881,7 @@ static void ixgbe_clear_udp_tunnel_port(struct ixgbe_adapter *adapter, u32 mask)
48814881
IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE)))
48824882
return;
48834883

4884-
vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) && ~mask;
4884+
vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) & ~mask;
48854885
IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, vxlanctrl);
48864886

48874887
if (mask & IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK)
@@ -8529,6 +8529,10 @@ static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
85298529
return ixgbe_ptp_set_ts_config(adapter, req);
85308530
case SIOCGHWTSTAMP:
85318531
return ixgbe_ptp_get_ts_config(adapter, req);
8532+
case SIOCGMIIPHY:
8533+
if (!adapter->hw.phy.ops.read_reg)
8534+
return -EOPNOTSUPP;
8535+
/* fall through */
85328536
default:
85338537
return mdio_mii_ioctl(&adapter->hw.phy.mdio, if_mii(req), cmd);
85348538
}

‎drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3505,20 +3505,6 @@ static int mlxsw_sp_fib_lpm_tree_link(struct mlxsw_sp *mlxsw_sp,
35053505
static void mlxsw_sp_fib_lpm_tree_unlink(struct mlxsw_sp *mlxsw_sp,
35063506
struct mlxsw_sp_fib *fib)
35073507
{
3508-
struct mlxsw_sp_prefix_usage req_prefix_usage = {{ 0 } };
3509-
struct mlxsw_sp_lpm_tree *lpm_tree;
3510-
3511-
/* Aggregate prefix lengths across all virtual routers to make
3512-
* sure we only have used prefix lengths in the LPM tree.
3513-
*/
3514-
mlxsw_sp_vrs_prefixes(mlxsw_sp, fib->proto, &req_prefix_usage);
3515-
lpm_tree = mlxsw_sp_lpm_tree_get(mlxsw_sp, &req_prefix_usage,
3516-
fib->proto);
3517-
if (IS_ERR(lpm_tree))
3518-
goto err_tree_get;
3519-
mlxsw_sp_vrs_lpm_tree_replace(mlxsw_sp, fib, lpm_tree);
3520-
3521-
err_tree_get:
35223508
if (!mlxsw_sp_prefix_usage_none(&fib->prefix_usage))
35233509
return;
35243510
mlxsw_sp_vr_lpm_tree_unbind(mlxsw_sp, fib);

‎drivers/net/ppp/ppp_generic.c‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,17 @@ ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64)
13391339

13401340
static int ppp_dev_init(struct net_device *dev)
13411341
{
1342+
struct ppp *ppp;
1343+
13421344
netdev_lockdep_set_classes(dev);
1345+
1346+
ppp = netdev_priv(dev);
1347+
/* Let the netdevice take a reference on the ppp file. This ensures
1348+
* that ppp_destroy_interface() won't run before the device gets
1349+
* unregistered.
1350+
*/
1351+
atomic_inc(&ppp->file.refcnt);
1352+
13431353
return 0;
13441354
}
13451355

@@ -1362,6 +1372,15 @@ static void ppp_dev_uninit(struct net_device *dev)
13621372
wake_up_interruptible(&ppp->file.rwait);
13631373
}
13641374

1375+
static void ppp_dev_priv_destructor(struct net_device *dev)
1376+
{
1377+
struct ppp *ppp;
1378+
1379+
ppp = netdev_priv(dev);
1380+
if (atomic_dec_and_test(&ppp->file.refcnt))
1381+
ppp_destroy_interface(ppp);
1382+
}
1383+
13651384
static const struct net_device_ops ppp_netdev_ops = {
13661385
.ndo_init = ppp_dev_init,
13671386
.ndo_uninit = ppp_dev_uninit,
@@ -1387,6 +1406,7 @@ static void ppp_setup(struct net_device *dev)
13871406
dev->tx_queue_len = 3;
13881407
dev->type = ARPHRD_PPP;
13891408
dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
1409+
dev->priv_destructor = ppp_dev_priv_destructor;
13901410
netif_keep_dst(dev);
13911411
}
13921412

0 commit comments

Comments
 (0)