Skip to content

Commit

Permalink
Merge tag 'net-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
torvalds committed May 8, 2021
2 parents dd86005 + 55bc1af commit fc858a5
Show file tree
Hide file tree
Showing 80 changed files with 689 additions and 330 deletions.
5 changes: 5 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,11 @@ S: Krosenska' 543
S: 181 00 Praha 8
S: Czech Republic

N: Murali Karicheri
E: [email protected]
D: Keystone NetCP driver
D: Keystone PCIe host controller driver

N: Jan "Yenya" Kasprzak
E: [email protected]
D: Author of the COSA/SRP sync serial board driver.
Expand Down
16 changes: 16 additions & 0 deletions Documentation/ABI/testing/sysfs-class-net-qmi
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,19 @@ Description:

Indicates the mux id associated to the qmimux network interface
during its creation.

What: /sys/class/net/<iface>/qmi/pass_through
Date: January 2021
KernelVersion: 5.12
Contact: Subash Abhinov Kasiviswanathan <[email protected]>
Description:
Boolean. Default: 'N'

Set this to 'Y' to enable 'pass-through' mode, allowing packets
in MAP format to be passed on to the stack.

Normally the rmnet driver (CONFIG_RMNET) is then used to process
and demultiplex these packets.

'Pass-through' mode can be enabled when the device is in
'raw-ip' mode only.
16 changes: 2 additions & 14 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ F: fs/affs/

AFS FILESYSTEM
M: David Howells <[email protected]>
M: Marc Dionne <[email protected]>
L: [email protected]
S: Supported
W: https://www.infradead.org/~dhowells/kafs/
Expand Down Expand Up @@ -14099,13 +14100,6 @@ F: Documentation/devicetree/bindings/pci/ti-pci.txt
F: drivers/pci/controller/cadence/pci-j721e.c
F: drivers/pci/controller/dwc/pci-dra7xx.c

PCI DRIVER FOR TI KEYSTONE
M: Murali Karicheri <[email protected]>
L: [email protected]
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: drivers/pci/controller/dwc/pci-keystone.c

PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC
M: Linus Walleij <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -15891,6 +15885,7 @@ F: drivers/infiniband/ulp/rtrs/

RXRPC SOCKETS (AF_RXRPC)
M: David Howells <[email protected]>
M: Marc Dionne <[email protected]>
L: [email protected]
S: Supported
W: https://www.infradead.org/~dhowells/kafs/
Expand Down Expand Up @@ -18307,13 +18302,6 @@ S: Maintained
F: sound/soc/codecs/isabelle*
F: sound/soc/codecs/lm49453*

TI NETCP ETHERNET DRIVER
M: Wingman Kwok <[email protected]>
M: Murali Karicheri <[email protected]>
L: [email protected]
S: Maintained
F: drivers/net/ethernet/ti/netcp*

TI PCM3060 ASoC CODEC DRIVER
M: Kirill Marinushkin <[email protected]>
L: [email protected] (moderated for non-subscribers)
Expand Down
1 change: 1 addition & 0 deletions drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ static void process_incoming (struct fs_dev *dev, struct queue *q)
switch (STATUS_CODE (qe)) {
case 0x1:
/* Fall through for streaming mode */
fallthrough;
case 0x2:/* Packet received OK.... */
if (atm_vcc) {
skb = pe->skb;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/can/m_can/m_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,8 @@ static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
int i;
int putidx;

cdev->tx_skb = NULL;

/* Generate ID field for TX buffer Element */
/* Common to all supported M_CAN versions */
if (cf->can_id & CAN_EFF_FLAG) {
Expand Down Expand Up @@ -1678,7 +1680,6 @@ static void m_can_tx_work_queue(struct work_struct *ws)
tx_work);

m_can_tx_handler(cdev);
cdev->tx_skb = NULL;
}

static netdev_tx_t m_can_start_xmit(struct sk_buff *skb,
Expand Down
35 changes: 18 additions & 17 deletions drivers/net/can/spi/mcp251x.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,8 +956,6 @@ static int mcp251x_stop(struct net_device *net)

priv->force_quit = 1;
free_irq(spi->irq, priv);
destroy_workqueue(priv->wq);
priv->wq = NULL;

mutex_lock(&priv->mcp_lock);

Expand Down Expand Up @@ -1224,24 +1222,15 @@ static int mcp251x_open(struct net_device *net)
goto out_close;
}

priv->wq = alloc_workqueue("mcp251x_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM,
0);
if (!priv->wq) {
ret = -ENOMEM;
goto out_clean;
}
INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
INIT_WORK(&priv->restart_work, mcp251x_restart_work_handler);

ret = mcp251x_hw_wake(spi);
if (ret)
goto out_free_wq;
goto out_free_irq;
ret = mcp251x_setup(net, spi);
if (ret)
goto out_free_wq;
goto out_free_irq;
ret = mcp251x_set_normal_mode(spi);
if (ret)
goto out_free_wq;
goto out_free_irq;

can_led_event(net, CAN_LED_EVENT_OPEN);

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

return 0;

out_free_wq:
destroy_workqueue(priv->wq);
out_clean:
out_free_irq:
free_irq(spi->irq, priv);
mcp251x_hw_sleep(spi);
out_close:
Expand Down Expand Up @@ -1373,6 +1360,15 @@ static int mcp251x_can_probe(struct spi_device *spi)
if (ret)
goto out_clk;

priv->wq = alloc_workqueue("mcp251x_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM,
0);
if (!priv->wq) {
ret = -ENOMEM;
goto out_clk;
}
INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
INIT_WORK(&priv->restart_work, mcp251x_restart_work_handler);

priv->spi = spi;
mutex_init(&priv->mcp_lock);

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

error_probe:
destroy_workqueue(priv->wq);
priv->wq = NULL;
mcp251x_power_enable(priv->power, 0);

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

mcp251x_power_enable(priv->power, 0);

destroy_workqueue(priv->wq);
priv->wq = NULL;

clk_disable_unprepare(priv->clk);

free_candev(net);
Expand Down
8 changes: 5 additions & 3 deletions drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2885,8 +2885,8 @@ static int mcp251xfd_probe(struct spi_device *spi)

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

/* Sanity check */
Expand Down Expand Up @@ -2986,10 +2986,12 @@ static int mcp251xfd_probe(struct spi_device *spi)

err = mcp251xfd_register(priv);
if (err)
goto out_free_candev;
goto out_can_rx_offload_del;

return 0;

out_can_rx_offload_del:
can_rx_offload_del(&priv->offload);
out_free_candev:
spi->max_speed_hz = priv->spi_max_speed_hz_orig;

Expand Down
3 changes: 3 additions & 0 deletions drivers/net/dsa/microchip/ksz8795_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ static int ksz8795_spi_probe(struct spi_device *spi)
int i, ret = 0;

ksz8 = devm_kzalloc(&spi->dev, sizeof(struct ksz8), GFP_KERNEL);
if (!ksz8)
return -ENOMEM;

ksz8->priv = spi;

dev = ksz_switch_alloc(&spi->dev, ksz8);
Expand Down
5 changes: 4 additions & 1 deletion drivers/net/dsa/microchip/ksz8863_smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,14 @@ static int ksz8863_smi_probe(struct mdio_device *mdiodev)
int i;

ksz8 = devm_kzalloc(&mdiodev->dev, sizeof(struct ksz8), GFP_KERNEL);
if (!ksz8)
return -ENOMEM;

ksz8->priv = mdiodev;

dev = ksz_switch_alloc(&mdiodev->dev, ksz8);
if (!dev)
return -EINVAL;
return -ENOMEM;

for (i = 0; i < ARRAY_SIZE(ksz8863_regmap_config); i++) {
rc = ksz8863_regmap_config[i];
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/alx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ static struct pci_driver alx_driver = {
module_pci_driver(alx_driver);
MODULE_DEVICE_TABLE(pci, alx_pci_tbl);
MODULE_AUTHOR("Johannes Berg <[email protected]>");
MODULE_AUTHOR("Qualcomm Corporation, <[email protected]>");
MODULE_AUTHOR("Qualcomm Corporation");
MODULE_DESCRIPTION(
"Qualcomm Atheros(R) AR816x/AR817x PCI-E Ethernet Network Driver");
MODULE_LICENSE("GPL");
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static const struct pci_device_id atl1c_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, atl1c_pci_tbl);

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

Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,6 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
return 0;
}

err = -EIO;
/* verify ari is enabled */
if (!pci_ari_enabled(bp->pdev->bus)) {
BNX2X_ERR("ARI not supported (check pci bridge ARI forwarding), SRIOV can not be enabled\n");
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/brocade/bna/bnad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ bnad_dim_timeout(struct timer_list *t)
}
}

/* Check for BNAD_CF_DIM_ENABLED, does not eleminate a race */
/* Check for BNAD_CF_DIM_ENABLED, does not eliminate a race */
if (test_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags))
mod_timer(&bnad->dim_timer,
jiffies + msecs_to_jiffies(BNAD_DIM_TIMER_FREQ));
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/cadence/macb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4852,7 +4852,7 @@ static int __maybe_unused macb_suspend(struct device *dev)
{
struct net_device *netdev = dev_get_drvdata(dev);
struct macb *bp = netdev_priv(netdev);
struct macb_queue *queue = bp->queues;
struct macb_queue *queue;
unsigned long flags;
unsigned int q;
int err;
Expand Down Expand Up @@ -4939,7 +4939,7 @@ static int __maybe_unused macb_resume(struct device *dev)
{
struct net_device *netdev = dev_get_drvdata(dev);
struct macb *bp = netdev_priv(netdev);
struct macb_queue *queue = bp->queues;
struct macb_queue *queue;
unsigned long flags;
unsigned int q;
int err;
Expand Down
16 changes: 9 additions & 7 deletions drivers/net/ethernet/chelsio/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2563,12 +2563,12 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
spin_lock_bh(&eosw_txq->lock);
if (tc != FW_SCHED_CLS_NONE) {
if (eosw_txq->state != CXGB4_EO_STATE_CLOSED)
goto out_unlock;
goto out_free_skb;

next_state = CXGB4_EO_STATE_FLOWC_OPEN_SEND;
} else {
if (eosw_txq->state != CXGB4_EO_STATE_ACTIVE)
goto out_unlock;
goto out_free_skb;

next_state = CXGB4_EO_STATE_FLOWC_CLOSE_SEND;
}
Expand Down Expand Up @@ -2604,17 +2604,19 @@ int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc)
eosw_txq_flush_pending_skbs(eosw_txq);

ret = eosw_txq_enqueue(eosw_txq, skb);
if (ret) {
dev_consume_skb_any(skb);
goto out_unlock;
}
if (ret)
goto out_free_skb;

eosw_txq->state = next_state;
eosw_txq->flowc_idx = eosw_txq->pidx;
eosw_txq_advance(eosw_txq, 1);
ethofld_xmit(dev, eosw_txq);

out_unlock:
spin_unlock_bh(&eosw_txq->lock);
return 0;

out_free_skb:
dev_consume_skb_any(skb);
spin_unlock_bh(&eosw_txq->lock);
return ret;
}
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/ethernet/cisco/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ static inline int enic_queue_wq_skb_encap(struct enic *enic, struct vnic_wq *wq,
return err;
}

static inline void enic_queue_wq_skb(struct enic *enic,
static inline int enic_queue_wq_skb(struct enic *enic,
struct vnic_wq *wq, struct sk_buff *skb)
{
unsigned int mss = skb_shinfo(skb)->gso_size;
Expand Down Expand Up @@ -814,6 +814,7 @@ static inline void enic_queue_wq_skb(struct enic *enic,
wq->to_use = buf->next;
dev_kfree_skb(skb);
}
return err;
}

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

enic_queue_wq_skb(enic, wq, skb);
if (enic_queue_wq_skb(enic, wq, skb))
goto error;

if (vnic_wq_desc_avail(wq) < MAX_SKB_FRAGS + ENIC_DESC_MAX_SPLITS)
netif_tx_stop_queue(txq);
skb_tx_timestamp(skb);
if (!netdev_xmit_more() || netif_xmit_stopped(txq))
vnic_wq_doorbell(wq);

error:
spin_unlock(&enic->wq_lock[txq_map]);

return NETDEV_TX_OK;
Expand Down
Loading

0 comments on commit fc858a5

Please sign in to comment.