Skip to content

Commit

Permalink
Merge tag 'net-6.1-rc8-2' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from bpf, can and wifi.

  Current release - new code bugs:

   - eth: mlx5e:
      - use kvfree() in mlx5e_accel_fs_tcp_create()
      - MACsec, fix RX data path 16 RX security channel limit
      - MACsec, fix memory leak when MACsec device is deleted
      - MACsec, fix update Rx secure channel active field
      - MACsec, fix add Rx security association (SA) rule memory leak

  Previous releases - regressions:

   - wifi: cfg80211: don't allow multi-BSSID in S1G

   - stmmac: set MAC's flow control register to reflect current settings

   - eth: mlx5:
      - E-switch, fix duplicate lag creation
      - fix use-after-free when reverting termination table

  Previous releases - always broken:

   - ipv4: fix route deletion when nexthop info is not specified

   - bpf: fix a local storage BPF map bug where the value's spin lock
     field can get initialized incorrectly

   - tipc: re-fetch skb cb after tipc_msg_validate

   - wifi: wilc1000: fix Information Element parsing

   - packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE

   - sctp: fix memory leak in sctp_stream_outq_migrate()

   - can: can327: fix potential skb leak when netdev is down

   - can: add number of missing netdev freeing on error paths

   - aquantia: do not purge addresses when setting the number of rings

   - wwan: iosm:
      - fix incorrect skb length leading to truncated packet
      - fix crash in peek throughput test due to skb UAF"

* tag 'net-6.1-rc8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (79 commits)
  net: ethernet: renesas: ravb: Fix promiscuous mode after system resumed
  MAINTAINERS: Update maintainer list for chelsio drivers
  ionic: update MAINTAINERS entry
  sctp: fix memory leak in sctp_stream_outq_migrate()
  packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE
  net/mlx5: Lag, Fix for loop when checking lag
  Revert "net/mlx5e: MACsec, remove replay window size limitation in offload path"
  net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions
  net: tun: Fix use-after-free in tun_detach()
  net: mdiobus: fix unbalanced node reference count
  net: hsr: Fix potential use-after-free
  tipc: re-fetch skb cb after tipc_msg_validate
  mptcp: fix sleep in atomic at close time
  mptcp: don't orphan ssk in mptcp_close()
  dsa: lan9303: Correct stat name
  ipv4: Fix route deletion when nexthop info is not specified
  net: wwan: iosm: fix incorrect skb length
  net: wwan: iosm: fix crash in peek throughput test
  net: wwan: iosm: fix dma_alloc_coherent incompatible pointer type
  net: wwan: iosm: fix kernel test robot reported error
  ...
  • Loading branch information
torvalds committed Nov 29, 2022
2 parents ca57f02 + d66233a commit 01f856a
Show file tree
Hide file tree
Showing 73 changed files with 480 additions and 265 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ Sebastian Reichel <[email protected]> <[email protected]>
Sebastian Reichel <[email protected]> <[email protected]>
Sedat Dilek <[email protected]> <[email protected]>
Seth Forshee <[email protected]> <[email protected]>
Shannon Nelson <[email protected]> <[email protected]>
Shiraz Hashim <[email protected]> <[email protected]>
Shuah Khan <[email protected]> <[email protected]>
Shuah Khan <[email protected]> <[email protected]>
Expand Down
11 changes: 3 additions & 8 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5585,17 +5585,13 @@ F: drivers/scsi/cxgbi/cxgb3i

CXGB4 CRYPTO DRIVER (chcr)
M: Ayush Sawal <[email protected]>
M: Vinay Kumar Yadav <[email protected]>
M: Rohit Maheshwari <[email protected]>
L: [email protected]
S: Supported
W: http://www.chelsio.com
F: drivers/crypto/chelsio

CXGB4 INLINE CRYPTO DRIVER
M: Ayush Sawal <[email protected]>
M: Vinay Kumar Yadav <[email protected]>
M: Rohit Maheshwari <[email protected]>
L: [email protected]
S: Supported
W: http://www.chelsio.com
Expand Down Expand Up @@ -16149,7 +16145,8 @@ F: include/linux/peci-cpu.h
F: include/linux/peci.h

PENSANDO ETHERNET DRIVERS
M: Shannon Nelson <[email protected]>
M: Shannon Nelson <[email protected]>
M: Brett Creeley <[email protected]>
M: [email protected]
L: [email protected]
S: Supported
Expand Down Expand Up @@ -17485,10 +17482,8 @@ S: Maintained
F: drivers/net/wireless/realtek/rtw89/

REDPINE WIRELESS DRIVER
M: Amitkumar Karwar <[email protected]>
M: Siva Rebbagondla <[email protected]>
L: [email protected]
S: Maintained
S: Orphan
F: drivers/net/wireless/rsi/

REGISTER MAP ABSTRACTION
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/can/can327.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ static void can327_feed_frame_to_netdev(struct can327 *elm, struct sk_buff *skb)
{
lockdep_assert_held(&elm->lock);

if (!netif_running(elm->dev))
if (!netif_running(elm->dev)) {
kfree_skb(skb);
return;
}

/* Queue for NAPI pickup.
* rx-offload will update stats and LEDs for us.
Expand Down
10 changes: 6 additions & 4 deletions drivers/net/can/cc770/cc770_isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,22 +264,24 @@ static int cc770_isa_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev,
"couldn't register device (err=%d)\n", err);
goto exit_unmap;
goto exit_free;
}

dev_info(&pdev->dev, "device registered (reg_base=0x%p, irq=%d)\n",
priv->reg_base, dev->irq);
return 0;

exit_unmap:
exit_free:
free_cc770dev(dev);
exit_unmap:
if (mem[idx])
iounmap(base);
exit_release:
exit_release:
if (mem[idx])
release_mem_region(mem[idx], iosize);
else
release_region(port[idx], iosize);
exit:
exit:
return err;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/m_can/m_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ int m_can_class_get_clocks(struct m_can_classdev *cdev)
cdev->hclk = devm_clk_get(cdev->dev, "hclk");
cdev->cclk = devm_clk_get(cdev->dev, "cclk");

if (IS_ERR(cdev->cclk)) {
if (IS_ERR(cdev->hclk) || IS_ERR(cdev->cclk)) {
dev_err(cdev->dev, "no clock found\n");
ret = -ENODEV;
}
Expand Down
9 changes: 6 additions & 3 deletions drivers/net/can/m_can/m_can_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)

ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_ALL_TYPES);
if (ret < 0)
return ret;
goto err_free_dev;

mcan_class->dev = &pci->dev;
mcan_class->net->irq = pci_irq_vector(pci, 0);
Expand All @@ -132,7 +132,7 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)

ret = m_can_class_register(mcan_class);
if (ret)
goto err;
goto err_free_irq;

/* Enable interrupt control at CAN wrapper IP */
writel(0x1, base + CTL_CSR_INT_CTL_OFFSET);
Expand All @@ -144,8 +144,10 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)

return 0;

err:
err_free_irq:
pci_free_irq_vectors(pci);
err_free_dev:
m_can_class_free_dev(mcan_class->net);
return ret;
}

Expand All @@ -161,6 +163,7 @@ static void m_can_pci_remove(struct pci_dev *pci)
writel(0x0, priv->base + CTL_CSR_INT_CTL_OFFSET);

m_can_class_unregister(mcan_class);
m_can_class_free_dev(mcan_class->net);
pci_free_irq_vectors(pci);
}

Expand Down
10 changes: 6 additions & 4 deletions drivers/net/can/sja1000/sja1000_isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,24 @@ static int sja1000_isa_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev, "registering %s failed (err=%d)\n",
DRV_NAME, err);
goto exit_unmap;
goto exit_free;
}

dev_info(&pdev->dev, "%s device registered (reg_base=0x%p, irq=%d)\n",
DRV_NAME, priv->reg_base, dev->irq);
return 0;

exit_unmap:
exit_free:
free_sja1000dev(dev);
exit_unmap:
if (mem[idx])
iounmap(base);
exit_release:
exit_release:
if (mem[idx])
release_mem_region(mem[idx], iosize);
else
release_region(port[idx], iosize);
exit:
exit:
return err;
}

Expand Down
5 changes: 4 additions & 1 deletion drivers/net/can/usb/etas_es58x/es58x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2091,8 +2091,11 @@ static int es58x_init_netdev(struct es58x_device *es58x_dev, int channel_idx)
netdev->dev_port = channel_idx;

ret = register_candev(netdev);
if (ret)
if (ret) {
es58x_dev->netdev[channel_idx] = NULL;
free_candev(netdev);
return ret;
}

netdev_queue_set_dql_min_limit(netdev_get_tx_queue(netdev, 0),
es58x_dev->param->dql_min_limit);
Expand Down
10 changes: 7 additions & 3 deletions drivers/net/can/usb/mcba_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
#define MCBA_VER_REQ_USB 1
#define MCBA_VER_REQ_CAN 2

/* Drive the CAN_RES signal LOW "0" to activate R24 and R25 */
#define MCBA_VER_TERMINATION_ON 0
#define MCBA_VER_TERMINATION_OFF 1

#define MCBA_SIDL_EXID_MASK 0x8
#define MCBA_DLC_MASK 0xf
#define MCBA_DLC_RTR_MASK 0x40
Expand Down Expand Up @@ -463,7 +467,7 @@ static void mcba_usb_process_ka_usb(struct mcba_priv *priv,
priv->usb_ka_first_pass = false;
}

if (msg->termination_state)
if (msg->termination_state == MCBA_VER_TERMINATION_ON)
priv->can.termination = MCBA_TERMINATION_ENABLED;
else
priv->can.termination = MCBA_TERMINATION_DISABLED;
Expand Down Expand Up @@ -785,9 +789,9 @@ static int mcba_set_termination(struct net_device *netdev, u16 term)
};

if (term == MCBA_TERMINATION_ENABLED)
usb_msg.termination = 1;
usb_msg.termination = MCBA_VER_TERMINATION_ON;
else
usb_msg.termination = 0;
usb_msg.termination = MCBA_VER_TERMINATION_OFF;

mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/lan9303-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ static const struct lan9303_mib_desc lan9303_mib[] = {
{ .offset = LAN9303_MAC_TX_BRDCST_CNT_0, .name = "TxBroad", },
{ .offset = LAN9303_MAC_TX_PAUSE_CNT_0, .name = "TxPause", },
{ .offset = LAN9303_MAC_TX_MULCST_CNT_0, .name = "TxMulti", },
{ .offset = LAN9303_MAC_RX_UNDSZE_CNT_0, .name = "TxUnderRun", },
{ .offset = LAN9303_MAC_RX_UNDSZE_CNT_0, .name = "RxShort", },
{ .offset = LAN9303_MAC_TX_64_CNT_0, .name = "Tx64Byte", },
{ .offset = LAN9303_MAC_TX_127_CNT_0, .name = "Tx128Byte", },
{ .offset = LAN9303_MAC_TX_255_CNT_0, .name = "Tx256Byte", },
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "aq_ptp.h"
#include "aq_filters.h"
#include "aq_macsec.h"
#include "aq_main.h"

#include <linux/ptp_clock_kernel.h>

Expand Down Expand Up @@ -858,7 +859,7 @@ static int aq_set_ringparam(struct net_device *ndev,

if (netif_running(ndev)) {
ndev_running = true;
dev_close(ndev);
aq_ndev_close(ndev);
}

cfg->rxds = max(ring->rx_pending, hw_caps->rxds_min);
Expand All @@ -874,7 +875,7 @@ static int aq_set_ringparam(struct net_device *ndev,
goto err_exit;

if (ndev_running)
err = dev_open(ndev, NULL);
err = aq_ndev_open(ndev);

err_exit:
return err;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/aquantia/atlantic/aq_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct net_device *aq_ndev_alloc(void)
return ndev;
}

static int aq_ndev_open(struct net_device *ndev)
int aq_ndev_open(struct net_device *ndev)
{
struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0;
Expand Down Expand Up @@ -88,7 +88,7 @@ static int aq_ndev_open(struct net_device *ndev)
return err;
}

static int aq_ndev_close(struct net_device *ndev)
int aq_ndev_close(struct net_device *ndev)
{
struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/aquantia/atlantic/aq_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ DECLARE_STATIC_KEY_FALSE(aq_xdp_locking_key);

void aq_ndev_schedule_work(struct work_struct *work);
struct net_device *aq_ndev_alloc(void);
int aq_ndev_open(struct net_device *ndev);
int aq_ndev_close(struct net_device *ndev);

#endif /* AQ_MAIN_H */
22 changes: 6 additions & 16 deletions drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#include "fec.h"

static void set_multicast_list(struct net_device *ndev);
static void fec_enet_itr_coal_init(struct net_device *ndev);
static void fec_enet_itr_coal_set(struct net_device *ndev);

#define DRIVER_NAME "fec"

Expand Down Expand Up @@ -1220,8 +1220,7 @@ fec_restart(struct net_device *ndev)
writel(0, fep->hwp + FEC_IMASK);

/* Init the interrupt coalescing */
fec_enet_itr_coal_init(ndev);

fec_enet_itr_coal_set(ndev);
}

static int fec_enet_ipc_handle_init(struct fec_enet_private *fep)
Expand Down Expand Up @@ -2856,19 +2855,6 @@ static int fec_enet_set_coalesce(struct net_device *ndev,
return 0;
}

static void fec_enet_itr_coal_init(struct net_device *ndev)
{
struct ethtool_coalesce ec;

ec.rx_coalesce_usecs = FEC_ITR_ICTT_DEFAULT;
ec.rx_max_coalesced_frames = FEC_ITR_ICFT_DEFAULT;

ec.tx_coalesce_usecs = FEC_ITR_ICTT_DEFAULT;
ec.tx_max_coalesced_frames = FEC_ITR_ICFT_DEFAULT;

fec_enet_set_coalesce(ndev, &ec, NULL, NULL);
}

static int fec_enet_get_tunable(struct net_device *netdev,
const struct ethtool_tunable *tuna,
void *data)
Expand Down Expand Up @@ -3623,6 +3609,10 @@ static int fec_enet_init(struct net_device *ndev)
fep->rx_align = 0x3;
fep->tx_align = 0x3;
#endif
fep->rx_pkts_itr = FEC_ITR_ICFT_DEFAULT;
fep->tx_pkts_itr = FEC_ITR_ICFT_DEFAULT;
fep->rx_time_itr = FEC_ITR_ICTT_DEFAULT;
fep->tx_time_itr = FEC_ITR_ICTT_DEFAULT;

/* Check mask of the streaming and coherent API */
ret = dma_set_mask_and_coherent(&fep->pdev->dev, DMA_BIT_MASK(32));
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/ethernet/intel/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,11 +1741,8 @@ static int e100_xmit_prepare(struct nic *nic, struct cb *cb,
dma_addr = dma_map_single(&nic->pdev->dev, skb->data, skb->len,
DMA_TO_DEVICE);
/* If we can't map the skb, have the upper layer try later */
if (dma_mapping_error(&nic->pdev->dev, dma_addr)) {
dev_kfree_skb_any(skb);
skb = NULL;
if (dma_mapping_error(&nic->pdev->dev, dma_addr))
return -ENOMEM;
}

/*
* Use the last 4 bytes of the SKB payload packet as the CRC, used for
Expand Down
10 changes: 9 additions & 1 deletion drivers/net/ethernet/intel/fm10k/fm10k_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ struct workqueue_struct *fm10k_workqueue;
**/
static int __init fm10k_init_module(void)
{
int ret;

pr_info("%s\n", fm10k_driver_string);
pr_info("%s\n", fm10k_copyright);

Expand All @@ -43,7 +45,13 @@ static int __init fm10k_init_module(void)

fm10k_dbg_init();

return fm10k_register_pci_driver();
ret = fm10k_register_pci_driver();
if (ret) {
fm10k_dbg_exit();
destroy_workqueue(fm10k_workqueue);
}

return ret;
}
module_init(fm10k_init_module);

Expand Down
11 changes: 10 additions & 1 deletion drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16644,6 +16644,8 @@ static struct pci_driver i40e_driver = {
**/
static int __init i40e_init_module(void)
{
int err;

pr_info("%s: %s\n", i40e_driver_name, i40e_driver_string);
pr_info("%s: %s\n", i40e_driver_name, i40e_copyright);

Expand All @@ -16661,7 +16663,14 @@ static int __init i40e_init_module(void)
}

i40e_dbg_init();
return pci_register_driver(&i40e_driver);
err = pci_register_driver(&i40e_driver);
if (err) {
destroy_workqueue(i40e_wq);
i40e_dbg_exit();
return err;
}

return 0;
}
module_init(i40e_init_module);

Expand Down
Loading

0 comments on commit 01f856a

Please sign in to comment.