Skip to content

Commit 96144c5

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Fix cfg80211 deadlock, from Johannes Berg. 2) RXRPC fails to send norigications, from David Howells. 3) MPTCP RM_ADDR parsing has an off by one pointer error, fix from Geliang Tang. 4) Fix crash when using MSG_PEEK with sockmap, from Anny Hu. 5) The ucc_geth driver needs __netdev_watchdog_up exported, from Valentin Longchamp. 6) Fix hashtable memory leak in dccp, from Wang Hai. 7) Fix how nexthops are marked as FDB nexthops, from David Ahern. 8) Fix mptcp races between shutdown and recvmsg, from Paolo Abeni. 9) Fix crashes in tipc_disc_rcv(), from Tuong Lien. 10) Fix link speed reporting in iavf driver, from Brett Creeley. 11) When a channel is used for XSK and then reused again later for XSK, we forget to clear out the relevant data structures in mlx5 which causes all kinds of problems. Fix from Maxim Mikityanskiy. 12) Fix memory leak in genetlink, from Cong Wang. 13) Disallow sockmap attachments to UDP sockets, it simply won't work. From Lorenz Bauer. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits) net: ethernet: ti: ale: fix allmulti for nu type ale net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init net: atm: Remove the error message according to the atomic context bpf: Undo internal BPF_PROBE_MEM in BPF insns dump libbpf: Support pre-initializing .bss global variables tools/bpftool: Fix skeleton codegen bpf: Fix memlock accounting for sock_hash bpf: sockmap: Don't attach programs to UDP sockets bpf: tcp: Recv() should return 0 when the peer socket is closed ibmvnic: Flush existing work items before device removal genetlink: clean up family attributes allocations net: ipa: header pad field only valid for AP->modem endpoint net: ipa: program upper nibbles of sequencer type net: ipa: fix modem LAN RX endpoint id net: ipa: program metadata mask differently ionic: add pcie_print_link_status rxrpc: Fix race between incoming ACK parser and retransmitter net/mlx5: E-Switch, Fix some error pointer dereferences net/mlx5: Don't fail driver on failure to create debugfs net/mlx5e: CT: Fix ipv6 nat header rewrite actions ...
2 parents f82e7b5 + bc13911 commit 96144c5

File tree

111 files changed

+1344
-647
lines changed

Some content is hidden

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

111 files changed

+1344
-647
lines changed

Documentation/networking/devlink-params-sja1105.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

Documentation/networking/devlink/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ parameters, info versions, and other features it supports.
4040
mv88e6xxx
4141
netdevsim
4242
nfp
43+
sja1105
4344
qed
4445
ti-cpsw-switch
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
=======================
4+
sja1105 devlink support
5+
=======================
6+
7+
This document describes the devlink features implemented
8+
by the ``sja1105`` device driver.
9+
10+
Parameters
11+
==========
12+
13+
.. list-table:: Driver-specific parameters implemented
14+
:widths: 5 5 5 85
15+
16+
* - Name
17+
- Type
18+
- Mode
19+
- Description
20+
* - ``best_effort_vlan_filtering``
21+
- Boolean
22+
- runtime
23+
- Allow plain ETH_P_8021Q headers to be used as DSA tags.
24+
25+
Benefits:
26+
27+
- Can terminate untagged traffic over switch net
28+
devices even when enslaved to a bridge with
29+
vlan_filtering=1.
30+
- Can terminate VLAN-tagged traffic over switch net
31+
devices even when enslaved to a bridge with
32+
vlan_filtering=1, with some constraints (no more than
33+
7 non-pvid VLANs per user port).
34+
- Can do QoS based on VLAN PCP and VLAN membership
35+
admission control for autonomously forwarded frames
36+
(regardless of whether they can be terminated on the
37+
CPU or not).
38+
39+
Drawbacks:
40+
41+
- User cannot use VLANs in range 1024-3071. If the
42+
switch receives frames with such VIDs, it will
43+
misinterpret them as DSA tags.
44+
- Switch uses Shared VLAN Learning (FDB lookup uses
45+
only DMAC as key).
46+
- When VLANs span cross-chip topologies, the total
47+
number of permitted VLANs may be less than 7 per
48+
port, due to a maximum number of 32 VLAN retagging
49+
rules per switch.

Documentation/networking/dsa/sja1105.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ the switch net devices:
103103
+-------------+-----------+--------------+------------+
104104
| | Mode 1 | Mode 2 | Mode 3 |
105105
+=============+===========+==============+============+
106-
| Regular | Yes | No | Yes |
106+
| Regular | Yes | No | Yes |
107107
| traffic | | (use master) | |
108108
+-------------+-----------+--------------+------------+
109109
| Management | Yes | Yes | Yes |
110-
| traffic | | | |
110+
| traffic | | | |
111111
| (BPDU, PTP) | | | |
112112
+-------------+-----------+--------------+------------+
113113

@@ -241,6 +241,7 @@ switch.
241241

242242
In this case, SJA1105 switch 1 consumes a total of 11 retagging entries, as
243243
follows:
244+
244245
- 8 retagging entries for VLANs 1 and 100 installed on its user ports
245246
(``sw1p0`` - ``sw1p3``)
246247
- 3 retagging entries for VLAN 100 installed on the user ports of SJA1105
@@ -249,6 +250,7 @@ follows:
249250
reverse retagging.
250251

251252
SJA1105 switch 2 also consumes 11 retagging entries, but organized as follows:
253+
252254
- 7 retagging entries for the bridge VLANs on its user ports (``sw2p0`` -
253255
``sw2p3``).
254256
- 4 retagging entries for VLAN 100 installed on the user ports of SJA1105

Documentation/networking/ethtool-netlink.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,11 +1028,11 @@ Request contents:
10281028
+--------------------------------------------+--------+-----------------------+
10291029
| ``ETHTOOL_A_CABLE_TEST_TDR_CFG`` | nested | test configuration |
10301030
+-+------------------------------------------+--------+-----------------------+
1031-
| | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE `` | u32 | first data distance |
1031+
| | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE`` | u32 | first data distance |
10321032
+-+-+----------------------------------------+--------+-----------------------+
1033-
| | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE `` | u32 | last data distance |
1033+
| | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE`` | u32 | last data distance |
10341034
+-+-+----------------------------------------+--------+-----------------------+
1035-
| | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE `` | u32 | distance of each step |
1035+
| | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE`` | u32 | distance of each step |
10361036
+-+-+----------------------------------------+--------+-----------------------+
10371037
| | ``ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR`` | u8 | pair to test |
10381038
+-+-+----------------------------------------+--------+-----------------------+
@@ -1085,11 +1085,11 @@ used to report the amplitude of the reflection for a given pair.
10851085
+-+-+-----------------------------------------+--------+----------------------+
10861086
| | ``ETHTOOL_A_CABLE_NEST_STEP`` | nested | TDR step info |
10871087
+-+-+-----------------------------------------+--------+----------------------+
1088-
| | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE ``| u32 | First data distance |
1088+
| | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE`` | u32 | First data distance |
10891089
+-+-+-----------------------------------------+--------+----------------------+
1090-
| | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE `` | u32 | Last data distance |
1090+
| | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE`` | u32 | Last data distance |
10911091
+-+-+-----------------------------------------+--------+----------------------+
1092-
| | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE `` | u32 | distance of each step|
1092+
| | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE`` | u32 | distance of each step|
10931093
+-+-+-----------------------------------------+--------+----------------------+
10941094
| | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude |
10951095
+-+-+-----------------------------------------+--------+----------------------+

Documentation/networking/mac80211-injection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ interface), along the following lines:::
101101

102102
You can also find a link to a complete inject application here:
103103

104-
http://wireless.kernel.org/en/users/Documentation/packetspammer
104+
https://wireless.wiki.kernel.org/en/users/Documentation/packetspammer
105105

106106
Andy Green <[email protected]>

Documentation/networking/regulatory.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ regulatory infrastructure works.
99

1010
More up to date information can be obtained at the project's web page:
1111

12-
http://wireless.kernel.org/en/developers/Regulatory
12+
https://wireless.wiki.kernel.org/en/developers/Regulatory
1313

1414
Keeping regulatory domains in userspace
1515
---------------------------------------
@@ -37,7 +37,7 @@ expected regulatory domains will be respected by the kernel.
3737
A currently available userspace agent which can accomplish this
3838
is CRDA - central regulatory domain agent. Its documented here:
3939

40-
http://wireless.kernel.org/en/developers/Regulatory/CRDA
40+
https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA
4141

4242
Essentially the kernel will send a udev event when it knows
4343
it needs a new regulatory domain. A udev rule can be put in place
@@ -58,7 +58,7 @@ Who asks for regulatory domains?
5858

5959
Users can use iw:
6060

61-
http://wireless.kernel.org/en/users/Documentation/iw
61+
https://wireless.wiki.kernel.org/en/users/Documentation/iw
6262

6363
An example::
6464

drivers/crypto/chelsio/chcr_algo.c

Lines changed: 59 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,11 +2590,22 @@ int chcr_aead_dma_map(struct device *dev,
25902590
struct chcr_aead_reqctx *reqctx = aead_request_ctx(req);
25912591
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
25922592
unsigned int authsize = crypto_aead_authsize(tfm);
2593-
int dst_size;
2593+
int src_len, dst_len;
25942594

2595-
dst_size = req->assoclen + req->cryptlen + (op_type ?
2596-
0 : authsize);
2597-
if (!req->cryptlen || !dst_size)
2595+
/* calculate and handle src and dst sg length separately
2596+
* for inplace and out-of place operations
2597+
*/
2598+
if (req->src == req->dst) {
2599+
src_len = req->assoclen + req->cryptlen + (op_type ?
2600+
0 : authsize);
2601+
dst_len = src_len;
2602+
} else {
2603+
src_len = req->assoclen + req->cryptlen;
2604+
dst_len = req->assoclen + req->cryptlen + (op_type ?
2605+
-authsize : authsize);
2606+
}
2607+
2608+
if (!req->cryptlen || !src_len || !dst_len)
25982609
return 0;
25992610
reqctx->iv_dma = dma_map_single(dev, reqctx->iv, (IV + reqctx->b0_len),
26002611
DMA_BIDIRECTIONAL);
@@ -2606,20 +2617,23 @@ int chcr_aead_dma_map(struct device *dev,
26062617
reqctx->b0_dma = 0;
26072618
if (req->src == req->dst) {
26082619
error = dma_map_sg(dev, req->src,
2609-
sg_nents_for_len(req->src, dst_size),
2620+
sg_nents_for_len(req->src, src_len),
26102621
DMA_BIDIRECTIONAL);
26112622
if (!error)
26122623
goto err;
26132624
} else {
2614-
error = dma_map_sg(dev, req->src, sg_nents(req->src),
2625+
error = dma_map_sg(dev, req->src,
2626+
sg_nents_for_len(req->src, src_len),
26152627
DMA_TO_DEVICE);
26162628
if (!error)
26172629
goto err;
2618-
error = dma_map_sg(dev, req->dst, sg_nents(req->dst),
2630+
error = dma_map_sg(dev, req->dst,
2631+
sg_nents_for_len(req->dst, dst_len),
26192632
DMA_FROM_DEVICE);
26202633
if (!error) {
2621-
dma_unmap_sg(dev, req->src, sg_nents(req->src),
2622-
DMA_TO_DEVICE);
2634+
dma_unmap_sg(dev, req->src,
2635+
sg_nents_for_len(req->src, src_len),
2636+
DMA_TO_DEVICE);
26232637
goto err;
26242638
}
26252639
}
@@ -2637,24 +2651,37 @@ void chcr_aead_dma_unmap(struct device *dev,
26372651
struct chcr_aead_reqctx *reqctx = aead_request_ctx(req);
26382652
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
26392653
unsigned int authsize = crypto_aead_authsize(tfm);
2640-
int dst_size;
2654+
int src_len, dst_len;
26412655

2642-
dst_size = req->assoclen + req->cryptlen + (op_type ?
2643-
0 : authsize);
2644-
if (!req->cryptlen || !dst_size)
2656+
/* calculate and handle src and dst sg length separately
2657+
* for inplace and out-of place operations
2658+
*/
2659+
if (req->src == req->dst) {
2660+
src_len = req->assoclen + req->cryptlen + (op_type ?
2661+
0 : authsize);
2662+
dst_len = src_len;
2663+
} else {
2664+
src_len = req->assoclen + req->cryptlen;
2665+
dst_len = req->assoclen + req->cryptlen + (op_type ?
2666+
-authsize : authsize);
2667+
}
2668+
2669+
if (!req->cryptlen || !src_len || !dst_len)
26452670
return;
26462671

26472672
dma_unmap_single(dev, reqctx->iv_dma, (IV + reqctx->b0_len),
26482673
DMA_BIDIRECTIONAL);
26492674
if (req->src == req->dst) {
26502675
dma_unmap_sg(dev, req->src,
2651-
sg_nents_for_len(req->src, dst_size),
2676+
sg_nents_for_len(req->src, src_len),
26522677
DMA_BIDIRECTIONAL);
26532678
} else {
2654-
dma_unmap_sg(dev, req->src, sg_nents(req->src),
2655-
DMA_TO_DEVICE);
2656-
dma_unmap_sg(dev, req->dst, sg_nents(req->dst),
2657-
DMA_FROM_DEVICE);
2679+
dma_unmap_sg(dev, req->src,
2680+
sg_nents_for_len(req->src, src_len),
2681+
DMA_TO_DEVICE);
2682+
dma_unmap_sg(dev, req->dst,
2683+
sg_nents_for_len(req->dst, dst_len),
2684+
DMA_FROM_DEVICE);
26582685
}
26592686
}
26602687

@@ -4364,22 +4391,32 @@ static int chcr_unregister_alg(void)
43644391
for (i = 0; i < ARRAY_SIZE(driver_algs); i++) {
43654392
switch (driver_algs[i].type & CRYPTO_ALG_TYPE_MASK) {
43664393
case CRYPTO_ALG_TYPE_SKCIPHER:
4367-
if (driver_algs[i].is_registered)
4394+
if (driver_algs[i].is_registered && refcount_read(
4395+
&driver_algs[i].alg.skcipher.base.cra_refcnt)
4396+
== 1) {
43684397
crypto_unregister_skcipher(
43694398
&driver_algs[i].alg.skcipher);
4399+
driver_algs[i].is_registered = 0;
4400+
}
43704401
break;
43714402
case CRYPTO_ALG_TYPE_AEAD:
4372-
if (driver_algs[i].is_registered)
4403+
if (driver_algs[i].is_registered && refcount_read(
4404+
&driver_algs[i].alg.aead.base.cra_refcnt) == 1) {
43734405
crypto_unregister_aead(
43744406
&driver_algs[i].alg.aead);
4407+
driver_algs[i].is_registered = 0;
4408+
}
43754409
break;
43764410
case CRYPTO_ALG_TYPE_AHASH:
4377-
if (driver_algs[i].is_registered)
4411+
if (driver_algs[i].is_registered && refcount_read(
4412+
&driver_algs[i].alg.hash.halg.base.cra_refcnt)
4413+
== 1) {
43784414
crypto_unregister_ahash(
43794415
&driver_algs[i].alg.hash);
4416+
driver_algs[i].is_registered = 0;
4417+
}
43804418
break;
43814419
}
4382-
driver_algs[i].is_registered = 0;
43834420
}
43844421
return 0;
43854422
}

drivers/net/bonding/bond_main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,8 +3687,6 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
36873687
case BOND_RELEASE_OLD:
36883688
case SIOCBONDRELEASE:
36893689
res = bond_release(bond_dev, slave_dev);
3690-
if (!res)
3691-
netdev_update_lockdep_key(slave_dev);
36923690
break;
36933691
case BOND_SETHWADDR_OLD:
36943692
case SIOCBONDSETHWADDR:

drivers/net/bonding/bond_options.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,8 +1398,6 @@ static int bond_option_slaves_set(struct bonding *bond,
13981398
case '-':
13991399
slave_dbg(bond->dev, dev, "Releasing interface\n");
14001400
ret = bond_release(bond->dev, dev);
1401-
if (!ret)
1402-
netdev_update_lockdep_key(dev);
14031401
break;
14041402

14051403
default:

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,13 +2558,16 @@ static int macb_open(struct net_device *dev)
25582558

25592559
err = macb_phylink_connect(bp);
25602560
if (err)
2561-
goto pm_exit;
2561+
goto napi_exit;
25622562

25632563
netif_tx_start_all_queues(dev);
25642564

25652565
if (bp->ptp_info)
25662566
bp->ptp_info->ptp_init(dev);
25672567

2568+
napi_exit:
2569+
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
2570+
napi_disable(&queue->napi);
25682571
pm_exit:
25692572
if (err) {
25702573
pm_runtime_put_sync(&bp->pdev->dev);

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,8 +2907,9 @@ static int setup_dpni(struct fsl_mc_device *ls_dev)
29072907
if (err && err != -EOPNOTSUPP)
29082908
goto close;
29092909

2910-
priv->cls_rules = devm_kzalloc(dev, sizeof(struct dpaa2_eth_cls_rule) *
2911-
dpaa2_eth_fs_count(priv), GFP_KERNEL);
2910+
priv->cls_rules = devm_kcalloc(dev, dpaa2_eth_fs_count(priv),
2911+
sizeof(struct dpaa2_eth_cls_rule),
2912+
GFP_KERNEL);
29122913
if (!priv->cls_rules) {
29132914
err = -ENOMEM;
29142915
goto close;

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5184,6 +5184,9 @@ static int ibmvnic_remove(struct vio_dev *dev)
51845184
adapter->state = VNIC_REMOVING;
51855185
spin_unlock_irqrestore(&adapter->state_lock, flags);
51865186

5187+
flush_work(&adapter->ibmvnic_reset);
5188+
flush_delayed_work(&adapter->ibmvnic_delayed_reset);
5189+
51875190
rtnl_lock();
51885191
unregister_netdevice(netdev);
51895192

0 commit comments

Comments
 (0)