Skip to content

Commit fc858a5

Browse files
committed
Merge tag 'net-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.13-rc1, including fixes from bpf, can and netfilter trees. Self-contained fixes, nothing risky. Current release - new code bugs: - dsa: ksz: fix a few bugs found by static-checker in the new driver - stmmac: fix frame preemption handshake not triggering after interface restart Previous releases - regressions: - make nla_strcmp handle more then one trailing null character - fix stack OOB reads while fragmenting IPv4 packets in openvswitch and net/sched - sctp: do asoc update earlier in sctp_sf_do_dupcook_a - sctp: delay auto_asconf init until binding the first addr - stmmac: clear receive all(RA) bit when promiscuous mode is off - can: mcp251x: fix resume from sleep before interface was brought up Previous releases - always broken: - bpf: fix leakage of uninitialized bpf stack under speculation - bpf: fix masking negation logic upon negative dst register - netfilter: don't assume that skb_header_pointer() will never fail - only allow init netns to set default tcp cong to a restricted algo - xsk: fix xp_aligned_validate_desc() when len == chunk_size to avoid false positive errors - ethtool: fix missing NLM_F_MULTI flag when dumping - can: m_can: m_can_tx_work_queue(): fix tx_skb race condition - sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b - bridge: fix NULL-deref caused by a races between assigning rx_handler_data and setting the IFF_BRIDGE_PORT bit Latecomer: - seg6: add counters support for SRv6 Behaviors" * tag 'net-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (73 commits) atm: firestream: Use fallthrough pseudo-keyword net: stmmac: Do not enable RX FIFO overflow interrupts mptcp: fix splat when closing unaccepted socket i40e: Remove LLDP frame filters i40e: Fix PHY type identifiers for 2.5G and 5G adapters i40e: fix the restart auto-negotiation after FEC modified i40e: Fix use-after-free in i40e_client_subtask() i40e: fix broken XDP support netfilter: nftables: avoid potential overflows on 32bit arches netfilter: nftables: avoid overflows in nft_hash_buckets() tcp: Specify cmsgbuf is user pointer for receive zerocopy. mlxsw: spectrum_mr: Update egress RIF list before route's action net: ipa: fix inter-EE IRQ register definitions can: m_can: m_can_tx_work_queue(): fix tx_skb race condition can: mcp251x: fix resume from sleep before interface was brought up can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path can: mcp251xfd: mcp251xfd_probe(): fix an error pointer dereference in probe netfilter: nftables: Fix a memleak from userdata error path in new objects netfilter: remove BUG_ON() after skb_header_pointer() netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check ...
2 parents dd86005 + 55bc1af commit fc858a5

Some content is hidden

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

80 files changed

+689
-330
lines changed

CREDITS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,6 +1874,11 @@ S: Krosenska' 543
18741874
S: 181 00 Praha 8
18751875
S: Czech Republic
18761876

1877+
N: Murali Karicheri
1878+
1879+
D: Keystone NetCP driver
1880+
D: Keystone PCIe host controller driver
1881+
18771882
N: Jan "Yenya" Kasprzak
18781883
18791884
D: Author of the COSA/SRP sync serial board driver.

Documentation/ABI/testing/sysfs-class-net-qmi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,19 @@ Description:
5858

5959
Indicates the mux id associated to the qmimux network interface
6060
during its creation.
61+
62+
What: /sys/class/net/<iface>/qmi/pass_through
63+
Date: January 2021
64+
KernelVersion: 5.12
65+
Contact: Subash Abhinov Kasiviswanathan <[email protected]>
66+
Description:
67+
Boolean. Default: 'N'
68+
69+
Set this to 'Y' to enable 'pass-through' mode, allowing packets
70+
in MAP format to be passed on to the stack.
71+
72+
Normally the rmnet driver (CONFIG_RMNET) is then used to process
73+
and demultiplex these packets.
74+
75+
'Pass-through' mode can be enabled when the device is in
76+
'raw-ip' mode only.

MAINTAINERS

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ F: fs/affs/
624624

625625
AFS FILESYSTEM
626626
M: David Howells <[email protected]>
627+
M: Marc Dionne <[email protected]>
627628
628629
S: Supported
629630
W: https://www.infradead.org/~dhowells/kafs/
@@ -14099,13 +14100,6 @@ F: Documentation/devicetree/bindings/pci/ti-pci.txt
1409914100
F: drivers/pci/controller/cadence/pci-j721e.c
1410014101
F: drivers/pci/controller/dwc/pci-dra7xx.c
1410114102

14102-
PCI DRIVER FOR TI KEYSTONE
14103-
M: Murali Karicheri <[email protected]>
14104-
14105-
L: [email protected] (moderated for non-subscribers)
14106-
S: Maintained
14107-
F: drivers/pci/controller/dwc/pci-keystone.c
14108-
1410914103
PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC
1411014104
M: Linus Walleij <[email protected]>
1411114105
@@ -15891,6 +15885,7 @@ F: drivers/infiniband/ulp/rtrs/
1589115885

1589215886
RXRPC SOCKETS (AF_RXRPC)
1589315887
M: David Howells <[email protected]>
15888+
M: Marc Dionne <[email protected]>
1589415889
1589515890
S: Supported
1589615891
W: https://www.infradead.org/~dhowells/kafs/
@@ -18307,13 +18302,6 @@ S: Maintained
1830718302
F: sound/soc/codecs/isabelle*
1830818303
F: sound/soc/codecs/lm49453*
1830918304

18310-
TI NETCP ETHERNET DRIVER
18311-
M: Wingman Kwok <[email protected]>
18312-
M: Murali Karicheri <[email protected]>
18313-
18314-
S: Maintained
18315-
F: drivers/net/ethernet/ti/netcp*
18316-
1831718305
TI PCM3060 ASoC CODEC DRIVER
1831818306
M: Kirill Marinushkin <[email protected]>
1831918307
L: [email protected] (moderated for non-subscribers)

drivers/atm/firestream.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ static void process_incoming (struct fs_dev *dev, struct queue *q)
795795
switch (STATUS_CODE (qe)) {
796796
case 0x1:
797797
/* Fall through for streaming mode */
798+
fallthrough;
798799
case 0x2:/* Packet received OK.... */
799800
if (atm_vcc) {
800801
skb = pe->skb;

drivers/net/can/m_can/m_can.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,8 @@ static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
15621562
int i;
15631563
int putidx;
15641564

1565+
cdev->tx_skb = NULL;
1566+
15651567
/* Generate ID field for TX buffer Element */
15661568
/* Common to all supported M_CAN versions */
15671569
if (cf->can_id & CAN_EFF_FLAG) {
@@ -1678,7 +1680,6 @@ static void m_can_tx_work_queue(struct work_struct *ws)
16781680
tx_work);
16791681

16801682
m_can_tx_handler(cdev);
1681-
cdev->tx_skb = NULL;
16821683
}
16831684

16841685
static netdev_tx_t m_can_start_xmit(struct sk_buff *skb,

drivers/net/can/spi/mcp251x.c

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -956,8 +956,6 @@ static int mcp251x_stop(struct net_device *net)
956956

957957
priv->force_quit = 1;
958958
free_irq(spi->irq, priv);
959-
destroy_workqueue(priv->wq);
960-
priv->wq = NULL;
961959

962960
mutex_lock(&priv->mcp_lock);
963961

@@ -1224,24 +1222,15 @@ static int mcp251x_open(struct net_device *net)
12241222
goto out_close;
12251223
}
12261224

1227-
priv->wq = alloc_workqueue("mcp251x_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM,
1228-
0);
1229-
if (!priv->wq) {
1230-
ret = -ENOMEM;
1231-
goto out_clean;
1232-
}
1233-
INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
1234-
INIT_WORK(&priv->restart_work, mcp251x_restart_work_handler);
1235-
12361225
ret = mcp251x_hw_wake(spi);
12371226
if (ret)
1238-
goto out_free_wq;
1227+
goto out_free_irq;
12391228
ret = mcp251x_setup(net, spi);
12401229
if (ret)
1241-
goto out_free_wq;
1230+
goto out_free_irq;
12421231
ret = mcp251x_set_normal_mode(spi);
12431232
if (ret)
1244-
goto out_free_wq;
1233+
goto out_free_irq;
12451234

12461235
can_led_event(net, CAN_LED_EVENT_OPEN);
12471236

@@ -1250,9 +1239,7 @@ static int mcp251x_open(struct net_device *net)
12501239

12511240
return 0;
12521241

1253-
out_free_wq:
1254-
destroy_workqueue(priv->wq);
1255-
out_clean:
1242+
out_free_irq:
12561243
free_irq(spi->irq, priv);
12571244
mcp251x_hw_sleep(spi);
12581245
out_close:
@@ -1373,6 +1360,15 @@ static int mcp251x_can_probe(struct spi_device *spi)
13731360
if (ret)
13741361
goto out_clk;
13751362

1363+
priv->wq = alloc_workqueue("mcp251x_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM,
1364+
0);
1365+
if (!priv->wq) {
1366+
ret = -ENOMEM;
1367+
goto out_clk;
1368+
}
1369+
INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
1370+
INIT_WORK(&priv->restart_work, mcp251x_restart_work_handler);
1371+
13761372
priv->spi = spi;
13771373
mutex_init(&priv->mcp_lock);
13781374

@@ -1417,6 +1413,8 @@ static int mcp251x_can_probe(struct spi_device *spi)
14171413
return 0;
14181414

14191415
error_probe:
1416+
destroy_workqueue(priv->wq);
1417+
priv->wq = NULL;
14201418
mcp251x_power_enable(priv->power, 0);
14211419

14221420
out_clk:
@@ -1438,6 +1436,9 @@ static int mcp251x_can_remove(struct spi_device *spi)
14381436

14391437
mcp251x_power_enable(priv->power, 0);
14401438

1439+
destroy_workqueue(priv->wq);
1440+
priv->wq = NULL;
1441+
14411442
clk_disable_unprepare(priv->clk);
14421443

14431444
free_candev(net);

drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,8 +2885,8 @@ static int mcp251xfd_probe(struct spi_device *spi)
28852885

28862886
clk = devm_clk_get(&spi->dev, NULL);
28872887
if (IS_ERR(clk))
2888-
dev_err_probe(&spi->dev, PTR_ERR(clk),
2889-
"Failed to get Oscillator (clock)!\n");
2888+
return dev_err_probe(&spi->dev, PTR_ERR(clk),
2889+
"Failed to get Oscillator (clock)!\n");
28902890
freq = clk_get_rate(clk);
28912891

28922892
/* Sanity check */
@@ -2986,10 +2986,12 @@ static int mcp251xfd_probe(struct spi_device *spi)
29862986

29872987
err = mcp251xfd_register(priv);
29882988
if (err)
2989-
goto out_free_candev;
2989+
goto out_can_rx_offload_del;
29902990

29912991
return 0;
29922992

2993+
out_can_rx_offload_del:
2994+
can_rx_offload_del(&priv->offload);
29932995
out_free_candev:
29942996
spi->max_speed_hz = priv->spi_max_speed_hz_orig;
29952997

drivers/net/dsa/microchip/ksz8795_spi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ static int ksz8795_spi_probe(struct spi_device *spi)
4141
int i, ret = 0;
4242

4343
ksz8 = devm_kzalloc(&spi->dev, sizeof(struct ksz8), GFP_KERNEL);
44+
if (!ksz8)
45+
return -ENOMEM;
46+
4447
ksz8->priv = spi;
4548

4649
dev = ksz_switch_alloc(&spi->dev, ksz8);

drivers/net/dsa/microchip/ksz8863_smi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,14 @@ static int ksz8863_smi_probe(struct mdio_device *mdiodev)
147147
int i;
148148

149149
ksz8 = devm_kzalloc(&mdiodev->dev, sizeof(struct ksz8), GFP_KERNEL);
150+
if (!ksz8)
151+
return -ENOMEM;
152+
150153
ksz8->priv = mdiodev;
151154

152155
dev = ksz_switch_alloc(&mdiodev->dev, ksz8);
153156
if (!dev)
154-
return -EINVAL;
157+
return -ENOMEM;
155158

156159
for (i = 0; i < ARRAY_SIZE(ksz8863_regmap_config); i++) {
157160
rc = ksz8863_regmap_config[i];

drivers/net/ethernet/atheros/alx/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ static struct pci_driver alx_driver = {
20162016
module_pci_driver(alx_driver);
20172017
MODULE_DEVICE_TABLE(pci, alx_pci_tbl);
20182018
MODULE_AUTHOR("Johannes Berg <[email protected]>");
2019-
MODULE_AUTHOR("Qualcomm Corporation, <[email protected]>");
2019+
MODULE_AUTHOR("Qualcomm Corporation");
20202020
MODULE_DESCRIPTION(
20212021
"Qualcomm Atheros(R) AR816x/AR817x PCI-E Ethernet Network Driver");
20222022
MODULE_LICENSE("GPL");

drivers/net/ethernet/atheros/atl1c/atl1c_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static const struct pci_device_id atl1c_pci_tbl[] = {
3232
MODULE_DEVICE_TABLE(pci, atl1c_pci_tbl);
3333

3434
MODULE_AUTHOR("Jie Yang");
35-
MODULE_AUTHOR("Qualcomm Atheros Inc., <[email protected]>");
35+
MODULE_AUTHOR("Qualcomm Atheros Inc.");
3636
MODULE_DESCRIPTION("Qualcomm Atheros 100/1000M Ethernet Network Driver");
3737
MODULE_LICENSE("GPL");
3838

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,6 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
11921192
return 0;
11931193
}
11941194

1195-
err = -EIO;
11961195
/* verify ari is enabled */
11971196
if (!pci_ari_enabled(bp->pdev->bus)) {
11981197
BNX2X_ERR("ARI not supported (check pci bridge ARI forwarding), SRIOV can not be enabled\n");

drivers/net/ethernet/brocade/bna/bnad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ bnad_dim_timeout(struct timer_list *t)
17641764
}
17651765
}
17661766

1767-
/* Check for BNAD_CF_DIM_ENABLED, does not eleminate a race */
1767+
/* Check for BNAD_CF_DIM_ENABLED, does not eliminate a race */
17681768
if (test_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags))
17691769
mod_timer(&bnad->dim_timer,
17701770
jiffies + msecs_to_jiffies(BNAD_DIM_TIMER_FREQ));

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4852,7 +4852,7 @@ static int __maybe_unused macb_suspend(struct device *dev)
48524852
{
48534853
struct net_device *netdev = dev_get_drvdata(dev);
48544854
struct macb *bp = netdev_priv(netdev);
4855-
struct macb_queue *queue = bp->queues;
4855+
struct macb_queue *queue;
48564856
unsigned long flags;
48574857
unsigned int q;
48584858
int err;
@@ -4939,7 +4939,7 @@ static int __maybe_unused macb_resume(struct device *dev)
49394939
{
49404940
struct net_device *netdev = dev_get_drvdata(dev);
49414941
struct macb *bp = netdev_priv(netdev);
4942-
struct macb_queue *queue = bp->queues;
4942+
struct macb_queue *queue;
49434943
unsigned long flags;
49444944
unsigned int q;
49454945
int err;

drivers/net/ethernet/chelsio/cxgb4/sge.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2563,12 +2563,12 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
25632563
spin_lock_bh(&eosw_txq->lock);
25642564
if (tc != FW_SCHED_CLS_NONE) {
25652565
if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
2566-
goto out_unlock;
2566+
goto out_free_skb;
25672567

25682568
next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
25692569
} else {
25702570
if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
2571-
goto out_unlock;
2571+
goto out_free_skb;
25722572

25732573
next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
25742574
}
@@ -2604,17 +2604,19 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
26042604
eosw_txq_flush_pending_skbs(eosw_txq);
26052605

26062606
ret = eosw_txq_enqueue(eosw_txq, skb);
2607-
if (ret) {
2608-
dev_consume_skb_any(skb);
2609-
goto out_unlock;
2610-
}
2607+
if (ret)
2608+
goto out_free_skb;
26112609

26122610
eosw_txq->state = next_state;
26132611
eosw_txq->flowc_idx = eosw_txq->pidx;
26142612
eosw_txq_advance(eosw_txq, 1);
26152613
ethofld_xmit(dev, eosw_txq);
26162614

2617-
out_unlock:
2615+
spin_unlock_bh(&eosw_txq->lock);
2616+
return 0;
2617+
2618+
out_free_skb:
2619+
dev_consume_skb_any(skb);
26182620
spin_unlock_bh(&eosw_txq->lock);
26192621
return ret;
26202622
}

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ static inline int enic_queue_wq_skb_encap(struct enic *enic, struct vnic_wq *wq,
768768
return err;
769769
}
770770

771-
static inline void enic_queue_wq_skb(struct enic *enic,
771+
static inline int enic_queue_wq_skb(struct enic *enic,
772772
struct vnic_wq *wq, struct sk_buff *skb)
773773
{
774774
unsigned int mss = skb_shinfo(skb)->gso_size;
@@ -814,6 +814,7 @@ static inline void enic_queue_wq_skb(struct enic *enic,
814814
wq->to_use = buf->next;
815815
dev_kfree_skb(skb);
816816
}
817+
return err;
817818
}
818819

819820
/* netif_tx_lock held, process context with BHs disabled, or BH */
@@ -857,14 +858,16 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
857858
return NETDEV_TX_BUSY;
858859
}
859860

860-
enic_queue_wq_skb(enic, wq, skb);
861+
if (enic_queue_wq_skb(enic, wq, skb))
862+
goto error;
861863

862864
if (vnic_wq_desc_avail(wq) < MAX_SKB_FRAGS + ENIC_DESC_MAX_SPLITS)
863865
netif_tx_stop_queue(txq);
864866
skb_tx_timestamp(skb);
865867
if (!netdev_xmit_more() || netif_xmit_stopped(txq))
866868
vnic_wq_doorbell(wq);
867869

870+
error:
868871
spin_unlock(&enic->wq_lock[txq_map]);
869872

870873
return NETDEV_TX_OK;

0 commit comments

Comments
 (0)