projects/linux·commit 4d02da97

Merge tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

4d02da97 · Linus Torvalds <[email protected]> · 2020-11-19 13:33:16 -08:00

Pull networking fixes from Jakub Kicinski:
 "Networking fixes for 5.10-rc5, including fixes from the WiFi
  (mac80211), can and bpf (including the strncpy_from_user fix).

  Current release - regressions:

   - mac80211: fix memory leak of filtered powersave frames

   - mac80211: free sta in sta_info_insert_finish() on errors to avoid
     sleeping in atomic context

   - netlabel: fix an uninitialized variable warning added in -rc4

  Previous release - regressions:

   - vsock: forward all packets to the host when no H2G is registered,
     un-breaking AWS Nitro Enclaves

   - net: Exempt multicast addresses from five-second neighbor lifetime
     requirement, decreasing the chances neighbor tables fill up

   - net/tls: fix corrupted data in recvmsg

   - qed: fix ILT configuration of SRC block

   - can: m_can: process interrupt only when not runtime suspended

  Previous release - always broken:

   - page_frag: Recover from memory pressure by not recycling pages
     allocating from the reserves

   - strncpy_from_user: Mask out bytes after NUL terminator

   - ip_tunnels: Set tunnel option flag only when tunnel metadata is
     present, always setting it confuses Open vSwitch

   - bpf, sockmap:
      - Fix partial copy_page_to_iter so progress can still be made
      - Fix socket memory accounting and obeying SO_RCVBUF

   - net: Have netpoll bring-up DSA management interface

   - net: bridge: add missing counters to ndo_get_stats64 callback

   - tcp: brr: only postpone PROBE_RTT if RTT is < current min_rtt

   - enetc: Workaround MDIO register access HW bug

   - net/ncsi: move netlink family registration to a subsystem init,
     instead of tying it to driver probe

   - net: ftgmac100: unregister NC-SI when removing driver to avoid
     crash

   - lan743x:
      - prevent interrupt storm on open
      - fix freeing skbs in the wrong context

   - net/mlx5e: Fix socket refcount leak on kTLS RX resync

   - net: dsa: mv88e6xxx: Avoid VLAN database corruption on 6097

   - fix 21 unset return codes and other mistakes on error paths, mostly
     detected by the Hulk Robot"

* tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (115 commits)
  fail_function: Remove a redundant mutex unlock
  selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL
  lib/strncpy_from_user.c: Mask out bytes after NUL terminator.
  net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid()
  net/smc: fix matching of existing link groups
  ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module
  libbpf: Fix VERSIONED_SYM_COUNT number parsing
  net/mlx4_core: Fix init_hca fields offset
  atm: nicstar: Unmap DMA on send error
  page_frag: Recover from memory pressure
  net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset
  mlxsw: core: Use variable timeout for EMAD retries
  mlxsw: Fix firmware flashing
  net: Have netpoll bring-up DSA management interface
  atl1e: fix error return code in atl1e_probe()
  atl1c: fix error return code in atl1c_probe()
  ah6: fix error return code in ah6_input()
  net: usb: qmi_wwan: Set DTR quirk for MR400
  can: m_can: process interrupt only when not runtime suspended
  can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery
  ...
Commit
4d02da974ea85a62074efedf354e82778f910d82
Parents
3be28e93 · e6ea60ba

Merge commit. Changes below are compared with the first parent: 3be28e93.

Changes

123 files changed · +1054 −379

FileStatusAddDelContent
MAINTAINERSmodified+13−14View file
drivers/atm/nicstar.cmodified+2−0View file
drivers/net/can/dev.cmodified+1−1View file
drivers/net/can/flexcan.cmodified+16−12View file
drivers/net/can/kvaser_pciefd.cmodified+2−2View file
drivers/net/can/m_can/Kconfigmodified+2−1View file
drivers/net/can/m_can/m_can.cmodified+13−5View file
drivers/net/can/m_can/m_can.hmodified+1−0View file
drivers/net/can/m_can/m_can_platform.cmodified+15−8View file
drivers/net/can/m_can/tcan4x5x.cmodified+23−9View file
drivers/net/can/ti_hecc.cmodified+8−5View file
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.cmodified+1−1View file
drivers/net/can/usb/mcba_usb.cmodified+2−2View file
drivers/net/can/usb/peak_usb/pcan_usb_core.cmodified+2−2View file
drivers/net/dsa/lantiq_gswip.cmodified+11−0View file
drivers/net/dsa/mv88e6xxx/chip.cmodified+2−0View file
drivers/net/dsa/mv88e6xxx/global1.cmodified+31−0View file
drivers/net/dsa/mv88e6xxx/global1.hmodified+1−0View file
drivers/net/dsa/mv88e6xxx/global1_vtu.cmodified+49−10View file
drivers/net/ethernet/atheros/atl1c/atl1c_main.cmodified+2−2View file
drivers/net/ethernet/atheros/atl1e/atl1e_main.cmodified+2−2View file
drivers/net/ethernet/broadcom/b44.cmodified+2−1View file
drivers/net/ethernet/broadcom/bnxt/bnxt.cmodified+3−1View file
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.cmodified+4−1View file
drivers/net/ethernet/faraday/ftgmac100.cmodified+4−0View file
drivers/net/ethernet/freescale/enetc/Kconfigmodified+1−0View file
drivers/net/ethernet/freescale/enetc/enetc.cmodified+45−17View file
drivers/net/ethernet/freescale/enetc/enetc_hw.hmodified+109−6View file
drivers/net/ethernet/freescale/enetc/enetc_mdio.cmodified+6−2View file
drivers/net/ethernet/freescale/fec_main.cmodified+5−7View file
drivers/net/ethernet/marvell/mvneta.cmodified+3−2View file
drivers/net/ethernet/marvell/prestera/prestera_pci.cmodified+5−2View file
drivers/net/ethernet/mediatek/mtk_star_emac.cmodified+2−1View file
drivers/net/ethernet/mellanox/mlx4/fw.cmodified+3−3View file
drivers/net/ethernet/mellanox/mlx4/fw.hmodified+2−2View file
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.cmodified+1−1View file
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.cmodified+7−7View file
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.cmodified+1−2View file
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.hmodified+5−4View file
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.cmodified+8−5View file
drivers/net/ethernet/mellanox/mlx5/core/en_tc.cmodified+3−1View file
drivers/net/ethernet/mellanox/mlx5/core/en_tc.hmodified+3−0View file
drivers/net/ethernet/mellanox/mlx5/core/en_tx.cmodified+6−7View file
drivers/net/ethernet/mellanox/mlx5/core/eswitch.cmodified+13−7View file
drivers/net/ethernet/mellanox/mlx5/core/fs_core.cmodified+7−0View file
drivers/net/ethernet/mellanox/mlxsw/Kconfigmodified+1−1View file
drivers/net/ethernet/mellanox/mlxsw/core.cmodified+2−1View file
drivers/net/ethernet/microchip/lan743x_main.cmodified+7−6View file
drivers/net/ethernet/qlogic/qed/qed_cxt.cmodified+2−2View file
drivers/net/ethernet/qlogic/qed/qed_cxt.hmodified+0−3View file
drivers/net/ethernet/qlogic/qed/qed_iwarp.cmodified+9−3View file
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.cmodified+2−1View file
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.cmodified+5−0View file
drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.cmodified+3−1View file
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.cmodified+1−1View file
drivers/net/ethernet/stmicro/stmmac/stmmac_main.cmodified+2−0View file
drivers/net/ethernet/ti/am65-cpts.cmodified+1−2View file
drivers/net/ethernet/ti/cpsw.cmodified+7−4View file
drivers/net/ethernet/ti/cpsw_new.cmodified+6−3View file
drivers/net/geneve.cmodified+1−2View file
drivers/net/ipa/gsi_trans.cmodified+12−3View file
drivers/net/netdevsim/dev.cmodified+2−0View file
drivers/net/netdevsim/health.cmodified+1−0View file
drivers/net/netdevsim/udp_tunnels.cmodified+1−0View file
drivers/net/phy/mscc/mscc_macsec.cmodified+0−1View file
drivers/net/phy/smsc.cmodified+3−1View file
drivers/net/usb/cx82310_eth.cmodified+2−1View file
drivers/net/usb/qmi_wwan.cmodified+1−1View file
include/linux/pm_runtime.hmodified+21−0View file
include/net/ip_tunnels.hmodified+4−3View file
include/net/ipv6_frag.hmodified+30−0View file
include/net/neighbour.hmodified+1−0View file
include/net/tls.hmodified+15−1View file
kernel/bpf/verifier.cmodified+15−3View file
kernel/fail_function.cmodified+3−2View file
kernel/trace/bpf_trace.cmodified+11−1View file
lib/strncpy_from_user.cmodified+17−2View file
mm/page_alloc.cmodified+5−0View file
net/bridge/br_device.cmodified+1−0View file
net/can/af_can.cmodified+28−10View file
net/core/devlink.cmodified+4−2View file
net/core/neighbour.cmodified+2−0View file
net/core/netpoll.cmodified+18−4View file
net/core/skmsg.cmodified+74−13View file
net/ipv4/arp.cmodified+6−0View file
net/ipv4/fib_frontend.cmodified+1−1View file
net/ipv4/inet_diag.cmodified+3−1View file
net/ipv4/tcp_bbr.cmodified+1−1View file
net/ipv4/tcp_bpf.cmodified+11−7View file
net/ipv6/addrconf.cmodified+6−2View file
net/ipv6/ah6.cmodified+2−1View file
net/ipv6/ndisc.cmodified+7−0View file
net/ipv6/netfilter/nf_conntrack_reasm.cmodified+9−0View file
net/ipv6/reassembly.cmodified+6−20View file
net/mac80211/rc80211_minstrel.cmodified+5−22View file
net/mac80211/rc80211_minstrel.hmodified+0−1View file
net/mac80211/sta_info.cmodified+4−10View file
net/mac80211/status.cmodified+8−10View file
net/ncsi/ncsi-manage.cmodified+0−5View file
net/ncsi/ncsi-netlink.cmodified+3−19View file
net/ncsi/ncsi-netlink.hmodified+0−3View file
net/netlabel/netlabel_unlabeled.cmodified+1−1View file
net/rfkill/core.cmodified+3−0View file
net/sctp/input.cmodified+2−2View file
net/sctp/sm_sideeffect.cmodified+2−2View file
net/sctp/transport.cmodified+1−1View file
net/smc/af_smc.cmodified+2−1View file
net/smc/smc_core.cmodified+2−1View file
net/smc/smc_ib.cmodified+3−3View file
net/tls/tls_device.cmodified+27−10View file
net/tls/tls_sw.cmodified+1−1View file
net/vmw_vsock/af_vsock.cmodified+1−1View file
net/x25/af_x25.cmodified+1−0View file
tools/bpf/bpftool/net.cmodified+9−9View file
tools/lib/bpf/Makefilemodified+2−0View file
tools/lib/bpf/libbpf.cmodified+13−10View file
tools/testing/selftests/bpf/prog_tests/probe_read_user_str.cadded+71−0View file
tools/testing/selftests/bpf/prog_tests/sockopt_multi.cmodified+2−1View file
tools/testing/selftests/bpf/prog_tests/subprogs.cmodified+6−0View file
tools/testing/selftests/bpf/prog_tests/test_global_funcs.cmodified+1−0View file
tools/testing/selftests/bpf/progs/test_global_func8.cadded+19−0View file
tools/testing/selftests/bpf/progs/test_probe_read_user_str.cadded+25−0View file
tools/testing/selftests/bpf/progs/test_subprogs_unused.cadded+21−0View file

Only the first 600 diff lines are shown. Download the complete patch.

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 5cc595a..c7f6924 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3233,10 +3233,10 @@ F: drivers/iio/accel/bma400*
BPF (Safe dynamic programs and tools)
M: Alexei Starovoitov <[email protected]>
M: Daniel Borkmann <[email protected]>
+M: Andrii Nakryiko <[email protected]>
R: Martin KaFai Lau <[email protected]>
R: Song Liu <[email protected]>
R: Yonghong Song <[email protected]>
-R: Andrii Nakryiko <[email protected]>
R: John Fastabend <[email protected]>
R: KP Singh <[email protected]>
@@ -4700,7 +4700,7 @@ T: git git://linuxtv.org/anttip/media_tree.git
F: drivers/media/dvb-frontends/cxd2820r*
CXGB3 ETHERNET DRIVER (CXGB3)
-M: Vishal Kulkarni <[email protected]>
+M: Raju Rangoju <[email protected]>
S: Supported
W: http://www.chelsio.com
@@ -4732,7 +4732,7 @@ W: http://www.chelsio.com
F: drivers/net/ethernet/chelsio/inline_crypto/
CXGB4 ETHERNET DRIVER (CXGB4)
-M: Vishal Kulkarni <[email protected]>
+M: Raju Rangoju <[email protected]>
S: Supported
W: http://www.chelsio.com
@@ -4754,7 +4754,7 @@ F: drivers/infiniband/hw/cxgb4/
F: include/uapi/rdma/cxgb4-abi.h
CXGB4VF ETHERNET DRIVER (CXGB4VF)
-M: Vishal Kulkarni <[email protected]>
+M: Raju Rangoju <[email protected]>
S: Supported
W: http://www.chelsio.com
@@ -9833,13 +9833,6 @@ S: Maintained
F: arch/mips/lantiq
F: drivers/soc/lantiq
-LAPB module
-S: Orphan
-F: Documentation/networking/lapb-module.rst
-F: include/*/lapb.h
-F: net/lapb/
-
LASI 53c700 driver for PARISC
M: "James E.J. Bottomley" <[email protected]>
@@ -18991,12 +18984,18 @@ L: [email protected]
S: Maintained
N: axp[128]
-X.25 NETWORK LAYER
-M: Andrew Hendry <[email protected]>
+X.25 STACK
+M: Martin Schiller <[email protected]>
-S: Odd Fixes
+S: Maintained
+F: Documentation/networking/lapb-module.rst
F: Documentation/networking/x25*
+F: drivers/net/wan/hdlc_x25.c
+F: drivers/net/wan/lapbether.c
+F: include/*/lapb.h
F: include/net/x25*
+F: include/uapi/linux/x25.h
+F: net/lapb/
F: net/x25/
X86 ARCHITECTURE (32-BIT AND 64-BIT)

drivers/atm/nicstar.c

View file
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 7af74fb..09ad733 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -1706,6 +1706,8 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (push_scqe(card, vc, scq, &scqe, skb) != 0) {
atomic_inc(&vcc->stats->tx_err);
+ dma_unmap_single(&card->pcidev->dev, NS_PRV_DMA(skb), skb->len,
+ DMA_TO_DEVICE);
dev_kfree_skb_any(skb);
return -EIO;
}

drivers/net/can/dev.c

View file
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 6dee4f8..81e39d7 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -592,7 +592,7 @@ static void can_restart(struct net_device *dev)
cf->can_id |= CAN_ERR_RESTARTED;
- netif_rx(skb);
+ netif_rx_ni(skb);
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;

drivers/net/can/flexcan.c

View file
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 881799b..99e5f27 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -728,8 +728,10 @@ static int flexcan_get_berr_counter(const struct net_device *dev,
int err;
err = pm_runtime_get_sync(priv->dev);
- if (err < 0)
+ if (err < 0) {
+ pm_runtime_put_noidle(priv->dev);
return err;
+ }
err = __flexcan_get_berr_counter(dev, bec);
@@ -1565,14 +1567,10 @@ static int flexcan_chip_start(struct net_device *dev)
priv->write(reg_ctrl2, &regs->ctrl2);
}
- err = flexcan_transceiver_enable(priv);
- if (err)
- goto out_chip_disable;
-
/* synchronize with the can bus */
err = flexcan_chip_unfreeze(priv);
if (err)
- goto out_transceiver_disable;
+ goto out_chip_disable;
priv->can.state = CAN_STATE_ERROR_ACTIVE;
@@ -1590,8 +1588,6 @@ static int flexcan_chip_start(struct net_device *dev)
return 0;
- out_transceiver_disable:
- flexcan_transceiver_disable(priv);
out_chip_disable:
flexcan_chip_disable(priv);
return err;
@@ -1621,7 +1617,6 @@ static int __flexcan_chip_stop(struct net_device *dev, bool disable_on_error)
priv->write(priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_ALL,
&regs->ctrl);
- flexcan_transceiver_disable(priv);
priv->can.state = CAN_STATE_STOPPED;
return 0;
@@ -1654,17 +1649,23 @@ static int flexcan_open(struct net_device *dev)
}
err = pm_runtime_get_sync(priv->dev);
- if (err < 0)
+ if (err < 0) {
+ pm_runtime_put_noidle(priv->dev);
return err;
+ }
err = open_candev(dev);
if (err)
goto out_runtime_put;
- err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev);
+ err = flexcan_transceiver_enable(priv);
if (err)
goto out_close;
+ err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev);
+ if (err)
+ goto out_transceiver_disable;
+
if (priv->can.ctrlmode & CAN_CTRLMODE_FD)
priv->mb_size = sizeof(struct flexcan_mb) + CANFD_MAX_DLEN;
else
@@ -1716,6 +1717,8 @@ static int flexcan_open(struct net_device *dev)
can_rx_offload_del(&priv->offload);
out_free_irq:
free_irq(dev->irq, dev);
+ out_transceiver_disable:
+ flexcan_transceiver_disable(priv);
out_close:
close_candev(dev);
out_runtime_put:
@@ -1734,6 +1737,7 @@ static int flexcan_close(struct net_device *dev)
can_rx_offload_del(&priv->offload);
free_irq(dev->irq, dev);
+ flexcan_transceiver_disable(priv);
close_candev(dev);
pm_runtime_put(priv->dev);
@@ -1852,7 +1856,7 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
return -EINVAL;
/* stop mode property format is:
- * <&gpr req_gpr>.
+ * <&gpr req_gpr req_bit>.
*/
ret = of_property_read_u32_array(np, "fsl,stop-mode", out_val,
ARRAY_SIZE(out_val));

drivers/net/can/kvaser_pciefd.c

View file
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 6f76691..72acd1b 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -287,12 +287,12 @@ struct kvaser_pciefd_tx_packet {
static const struct can_bittiming_const kvaser_pciefd_bittiming_const = {
.name = KVASER_PCIEFD_DRV_NAME,
.tseg1_min = 1,
- .tseg1_max = 255,
+ .tseg1_max = 512,
.tseg2_min = 1,
.tseg2_max = 32,
.sjw_max = 16,
.brp_min = 1,
- .brp_max = 4096,
+ .brp_max = 8192,
.brp_inc = 1,
};

drivers/net/can/m_can/Kconfig

View file
diff --git a/drivers/net/can/m_can/Kconfig b/drivers/net/can/m_can/Kconfig
index 48be627..5f9f819 100644
--- a/drivers/net/can/m_can/Kconfig
+++ b/drivers/net/can/m_can/Kconfig
@@ -16,7 +16,8 @@ config CAN_M_CAN_PLATFORM
config CAN_M_CAN_TCAN4X5X
depends on CAN_M_CAN
- depends on REGMAP_SPI
+ depends on SPI
+ select REGMAP_SPI
tristate "TCAN4X5X M_CAN device"
help
Say Y here if you want support for Texas Instruments TCAN4x5x

drivers/net/can/m_can/m_can.c

View file
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 02c5795..f3fc37e 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -665,7 +665,7 @@ static int m_can_handle_state_change(struct net_device *dev,
unsigned int ecr;
switch (new_state) {
- case CAN_STATE_ERROR_ACTIVE:
+ case CAN_STATE_ERROR_WARNING:
/* error warning state */
cdev->can.can_stats.error_warning++;
cdev->can.state = CAN_STATE_ERROR_WARNING;
@@ -694,7 +694,7 @@ static int m_can_handle_state_change(struct net_device *dev,
__m_can_get_berr_counter(dev, &bec);
switch (new_state) {
- case CAN_STATE_ERROR_ACTIVE:
+ case CAN_STATE_ERROR_WARNING:
/* error warning state */
cf->can_id |= CAN_ERR_CRTL;
cf->data[1] = (bec.txerr > bec.rxerr) ?
@@ -956,6 +956,8 @@ static irqreturn_t m_can_isr(int irq, void *dev_id)
struct net_device_stats *stats = &dev->stats;
u32 ir;
+ if (pm_runtime_suspended(cdev->dev))
+ return IRQ_NONE;
ir = m_can_read(cdev, M_CAN_IR);
if (!ir)
return IRQ_NONE;
@@ -1414,6 +1416,9 @@ static void m_can_stop(struct net_device *dev)
/* disable all interrupts */
m_can_disable_all_interrupts(cdev);
+ /* Set init mode to disengage from the network */
+ m_can_config_endisable(cdev, true);
+
/* set the state as STOPPED */
cdev->can.state = CAN_STATE_STOPPED;
}
@@ -1812,6 +1817,12 @@ out:
}
EXPORT_SYMBOL_GPL(m_can_class_allocate_dev);
+void m_can_class_free_dev(struct net_device *net)
+{
+ free_candev(net);
+}
+EXPORT_SYMBOL_GPL(m_can_class_free_dev);
+
int m_can_class_register(struct m_can_classdev *m_can_dev)
{
int ret;
@@ -1850,7 +1861,6 @@ pm_runtime_fail:
if (ret) {
if (m_can_dev->pm_clock_support)
pm_runtime_disable(m_can_dev->dev);
- free_candev(m_can_dev->net);
}
return ret;
@@ -1908,8 +1918,6 @@ void m_can_class_unregister(struct m_can_classdev *m_can_dev)
unregister_candev(m_can_dev->net);
m_can_clk_stop(m_can_dev);
-
- free_candev(m_can_dev->net);
}
EXPORT_SYMBOL_GPL(m_can_class_unregister);

drivers/net/can/m_can/m_can.h

View file
diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h
index 49f42b5..b2699a7 100644
--- a/drivers/net/can/m_can/m_can.h
+++ b/drivers/net/can/m_can/m_can.h
@@ -99,6 +99,7 @@ struct m_can_classdev {
};
struct m_can_classdev *m_can_class_allocate_dev(struct device *dev);
+void m_can_class_free_dev(struct net_device *net);
int m_can_class_register(struct m_can_classdev *cdev);
void m_can_class_unregister(struct m_can_classdev *cdev);
int m_can_class_get_clocks(struct m_can_classdev *cdev);

drivers/net/can/m_can/m_can_platform.c

View file
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
index e6d0cb9..161cb9b 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -67,32 +67,36 @@ static int m_can_plat_probe(struct platform_device *pdev)
return -ENOMEM;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv)
- return -ENOMEM;
+ if (!priv) {
+ ret = -ENOMEM;
+ goto probe_fail;
+ }
mcan_class->device_data = priv;
- m_can_class_get_clocks(mcan_class);
+ ret = m_can_class_get_clocks(mcan_class);
+ if (ret)
+ goto probe_fail;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "m_can");
addr = devm_ioremap_resource(&pdev->dev, res);
irq = platform_get_irq_byname(pdev, "int0");
if (IS_ERR(addr) || irq < 0) {
ret = -EINVAL;
- goto failed_ret;
+ goto probe_fail;
}
/* message ram could be shared */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "message_ram");
if (!res) {
ret = -ENODEV;
- goto failed_ret;
+ goto probe_fail;
}
mram_addr = devm_ioremap(&pdev->dev, res->start, resource_size(res));
if (!mram_addr) {
ret = -ENOMEM;
- goto failed_ret;
+ goto probe_fail;
}
priv->base = addr;
@@ -111,9 +115,10 @@ static int m_can_plat_probe(struct platform_device *pdev)
m_can_init_ram(mcan_class);
- ret = m_can_class_register(mcan_class);
+ return m_can_class_register(mcan_class);
-failed_ret:
+probe_fail:
+ m_can_class_free_dev(mcan_class->net);
return ret;
}
@@ -134,6 +139,8 @@ static int m_can_plat_remove(struct platform_device *pdev)
m_can_class_unregister(mcan_class);
+ m_can_class_free_dev(mcan_class->net);
+
platform_set_drvdata(pdev, NULL);
return 0;

drivers/net/can/m_can/tcan4x5x.c

View file
diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c
index eacd428..e5d7d85 100644
--- a/drivers/net/can/m_can/tcan4x5x.c
+++ b/drivers/net/can/m_can/tcan4x5x.c
@@ -440,14 +440,18 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
return -ENOMEM;
priv = devm_kzalloc(&spi->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv)
- return -ENOMEM;
+ if (!priv) {
+ ret = -ENOMEM;
+ goto out_m_can_class_free_dev;
+ }
priv->power = devm_regulator_get_optional(&spi->dev, "vsup");
- if (PTR_ERR(priv->power) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
- else
+ if (PTR_ERR(priv->power) == -EPROBE_DEFER) {
+ ret = -EPROBE_DEFER;
+ goto out_m_can_class_free_dev;
+ } else {
priv->power = NULL;
+ }
mcan_class->device_data = priv;
@@ -460,8 +464,10 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
}
/* Sanity check */
- if (freq < 20000000 || freq > TCAN4X5X_EXT_CLK_DEF)
- return -ERANGE;
+ if (freq < 20000000 || freq > TCAN4X5X_EXT_CLK_DEF) {
+ ret = -ERANGE;
+ goto out_m_can_class_free_dev;
+ }
priv->reg_offset = TCAN4X5X_MCAN_OFFSET;
priv->mram_start = TCAN4X5X_MRAM_START;
@@ -487,6 +493,10 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
priv->regmap = devm_regmap_init(&spi->dev, &tcan4x5x_bus,
&spi->dev, &tcan4x5x_regmap);
+ if (IS_ERR(priv->regmap)) {
+ ret = PTR_ERR(priv->regmap);
+ goto out_clk;
+ }
ret = tcan4x5x_power_enable(priv->power, 1);
if (ret)
@@ -514,8 +524,10 @@ out_clk:
clk_disable_unprepare(mcan_class->cclk);
clk_disable_unprepare(mcan_class->hclk);
}
-
+ out_m_can_class_free_dev:
+ m_can_class_free_dev(mcan_class->net);
dev_err(&spi->dev, "Probe failed, err=%d\n", ret);
+
return ret;
}
@@ -523,9 +535,11 @@ static int tcan4x5x_can_remove(struct spi_device *spi)
{
struct tcan4x5x_priv *priv = spi_get_drvdata(spi);
+ m_can_class_unregister(priv->mcan_dev);
+
tcan4x5x_power_enable(priv->power, 0);
- m_can_class_unregister(priv->mcan_dev);
+ m_can_class_free_dev(priv->mcan_dev->net);
return 0;
}

drivers/net/can/ti_hecc.c

View file
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 9913f54..2c22f40 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -881,7 +881,8 @@ static int ti_hecc_probe(struct platform_device *pdev)
priv->base = devm_platform_ioremap_resource_byname(pdev, "hecc");
if (IS_ERR(priv->base)) {
dev_err(&pdev->dev, "hecc ioremap failed\n");
- return PTR_ERR(priv->base);
+ err = PTR_ERR(priv->base);
+ goto probe_exit_candev;
}
/* handle hecc-ram memory */
@@ -889,20 +890,22 @@ static int ti_hecc_probe(struct platform_device *pdev)
"hecc-ram");
if (IS_ERR(priv->hecc_ram)) {
dev_err(&pdev->dev, "hecc-ram ioremap failed\n");
- return PTR_ERR(priv->hecc_ram);
+ err = PTR_ERR(priv->hecc_ram);
+ goto probe_exit_candev;
}
/* handle mbx memory */
priv->mbx = devm_platform_ioremap_resource_byname(pdev, "mbx");
if (IS_ERR(priv->mbx)) {
dev_err(&pdev->dev, "mbx ioremap failed\n");
- return PTR_ERR(priv->mbx);
+ err = PTR_ERR(priv->mbx);
+ goto probe_exit_candev;
}
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!irq) {
dev_err(&pdev->dev, "No irq resource\n");
- goto probe_exit;
+ goto probe_exit_candev;
}
priv->ndev = ndev;
@@ -966,7 +969,7 @@ probe_exit_release_clk:
clk_put(priv->clk);
probe_exit_candev:
free_candev(ndev);
-probe_exit:
+
return err;
}

drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c

View file
diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c
index 7ab87a7..218fadc 100644
--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c
+++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c
@@ -367,7 +367,7 @@ static const struct can_bittiming_const kvaser_usb_hydra_kcan_bittiming_c = {
.tseg2_max = 32,
.sjw_max = 16,
.brp_min = 1,
- .brp_max = 4096,
+ .brp_max = 8192,
.brp_inc = 1,
};

drivers/net/can/usb/mcba_usb.c

View file
diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index 5857b37..e97f2e0 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -326,8 +326,6 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,
if (!ctx)
return NETDEV_TX_BUSY;
- can_put_echo_skb(skb, priv->netdev, ctx->ndx);
-
if (cf->can_id & CAN_EFF_FLAG) {
/* SIDH | SIDL | EIDH | EIDL
* 28 - 21 | 20 19 18 x x x 17 16 | 15 - 8 | 7 - 0
@@ -357,6 +355,8 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,
if (cf->can_id & CAN_RTR_FLAG)
usb_msg.dlc |= MCBA_DLC_RTR_MASK;
+ can_put_echo_skb(skb, priv->netdev, ctx->ndx);
+
err = mcba_usb_xmit(priv, (struct mcba_usb_msg *)&usb_msg, ctx);
if (err)
goto xmit_failed;

drivers/net/can/usb/peak_usb/pcan_usb_core.c

View file
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index c276479..204ccb2 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -156,7 +156,7 @@ void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *time)
if (time_ref->ts_dev_1 < time_ref->ts_dev_2) {
/* case when event time (tsw) wraps */
if (ts < time_ref->ts_dev_1)
- delta_ts = 1 << time_ref->adapter->ts_used_bits;
+ delta_ts = BIT_ULL(time_ref->adapter->ts_used_bits);
/* Otherwise, sync time counter (ts_dev_2) has wrapped:
* handle case when event time (tsn) hasn't.
@@ -168,7 +168,7 @@ void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *time)
* tsn ts
*/
} else if (time_ref->ts_dev_1 < ts) {
- delta_ts = -(1 << time_ref->adapter->ts_used_bits);
+ delta_ts = -BIT_ULL(time_ref->adapter->ts_used_bits);
}
/* add delay between last sync and event timestamps */

drivers/net/dsa/lantiq_gswip.c

View file
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 74db81d..09701c1 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -26,6 +26,7 @@
*/
#include <linux/clk.h>
+#include <linux/delay.h>
#include <linux/etherdevice.h>
#include <linux/firmware.h>
#include <linux/if_bridge.h>
@@ -1837,6 +1838,16 @@ static int gswip_gphy_fw_list(struct gswip_priv *priv,
i++;
}
+ /* The standalone PHY11G requires 300ms to be fully
+ * initialized and ready for any MDIO communication after being
+ * taken out of reset. For the SoC-internal GPHY variant there
+ * is no (known) documentation for the minimum time after a
+ * reset. Use the same value as for the standalone variant as
+ * some users have reported internal PHYs not being detected
+ * without any delay.
+ */
+ msleep(300);
+

This diff is incomplete. Download the complete patch.

drivers/net/dsa/mv88e6xxx/chip.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/dsa/mv88e6xxx/global1.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/dsa/mv88e6xxx/global1.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/dsa/mv88e6xxx/global1_vtu.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/atheros/atl1e/atl1e_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/broadcom/b44.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/broadcom/bnxt/bnxt.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/faraday/ftgmac100.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/enetc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/enetc/enetc.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/enetc/enetc_hw.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/enetc/enetc_mdio.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/fec_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/mvneta.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/prestera/prestera_pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mediatek/mtk_star_emac.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx4/fw.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx4/fw.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_tc.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/microchip/lan743x_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_cxt.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_cxt.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qed/qed_iwarp.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/ti/am65-cpts.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/ti/cpsw.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/ti/cpsw_new.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/geneve.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ipa/gsi_trans.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/netdevsim/dev.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/netdevsim/health.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/netdevsim/udp_tunnels.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/mscc/mscc_macsec.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/smsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/usb/cx82310_eth.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/usb/qmi_wwan.c

View file

This diff is incomplete. Download the complete patch.

include/linux/pm_runtime.h

View file

This diff is incomplete. Download the complete patch.

include/net/ip_tunnels.h

View file

This diff is incomplete. Download the complete patch.

include/net/ipv6_frag.h

View file

This diff is incomplete. Download the complete patch.

include/net/neighbour.h

View file

This diff is incomplete. Download the complete patch.

include/net/tls.h

View file

This diff is incomplete. Download the complete patch.

kernel/bpf/verifier.c

View file

This diff is incomplete. Download the complete patch.

kernel/fail_function.c

View file

This diff is incomplete. Download the complete patch.

kernel/trace/bpf_trace.c

View file

This diff is incomplete. Download the complete patch.

lib/strncpy_from_user.c

View file

This diff is incomplete. Download the complete patch.

mm/page_alloc.c

View file

This diff is incomplete. Download the complete patch.

net/bridge/br_device.c

View file

This diff is incomplete. Download the complete patch.

net/can/af_can.c

View file

This diff is incomplete. Download the complete patch.

net/core/devlink.c

View file

This diff is incomplete. Download the complete patch.

net/core/neighbour.c

View file

This diff is incomplete. Download the complete patch.

net/core/netpoll.c

View file

This diff is incomplete. Download the complete patch.

net/core/skmsg.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/arp.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/fib_frontend.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/inet_diag.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_bbr.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_bpf.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/addrconf.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/ah6.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/ndisc.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/netfilter/nf_conntrack_reasm.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/reassembly.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/rc80211_minstrel.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/rc80211_minstrel.h

View file

This diff is incomplete. Download the complete patch.

net/mac80211/sta_info.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/status.c

View file

This diff is incomplete. Download the complete patch.

net/ncsi/ncsi-manage.c

View file

This diff is incomplete. Download the complete patch.

net/ncsi/ncsi-netlink.c

View file

This diff is incomplete. Download the complete patch.

net/ncsi/ncsi-netlink.h

View file

This diff is incomplete. Download the complete patch.

net/netlabel/netlabel_unlabeled.c

View file

This diff is incomplete. Download the complete patch.

net/rfkill/core.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/input.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/sm_sideeffect.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/transport.c

View file

This diff is incomplete. Download the complete patch.

net/smc/af_smc.c

View file

This diff is incomplete. Download the complete patch.

net/smc/smc_core.c

View file

This diff is incomplete. Download the complete patch.

net/smc/smc_ib.c

View file

This diff is incomplete. Download the complete patch.

net/tls/tls_device.c

View file

This diff is incomplete. Download the complete patch.

net/tls/tls_sw.c

View file

This diff is incomplete. Download the complete patch.

net/vmw_vsock/af_vsock.c

View file

This diff is incomplete. Download the complete patch.

net/x25/af_x25.c

View file

This diff is incomplete. Download the complete patch.

tools/bpf/bpftool/net.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/bpf/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/lib/bpf/libbpf.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/prog_tests/probe_read_user_str.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/prog_tests/sockopt_multi.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/prog_tests/subprogs.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/prog_tests/test_global_funcs.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/progs/test_global_func8.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/progs/test_probe_read_user_str.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/progs/test_subprogs_unused.c

View file

This diff is incomplete. Download the complete patch.