Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Browse files Browse the repository at this point in the history
Pull networking fixes from David Miller:
 "Yeah I should have sent a pull request last week, so there is a lot
  more here than usual:

   1) Fix memory leak in ebtables compat code, from Wenwen Wang.

   2) Several kTLS bug fixes from Jakub Kicinski (circular close on
      disconnect etc.)

   3) Force slave speed check on link state recovery in bonding 802.3ad
      mode, from Thomas Falcon.

   4) Clear RX descriptor bits before assigning buffers to them in
      stmmac, from Jose Abreu.

   5) Several missing of_node_put() calls, mostly wrt. for_each_*() OF
      loops, from Nishka Dasgupta.

   6) Double kfree_skb() in peak_usb can driver, from Stephane Grosjean.

   7) Need to hold sock across skb->destructor invocation, from Cong
      Wang.

   8) IP header length needs to be validated in ipip tunnel xmit, from
      Haishuang Yan.

   9) Use after free in ip6 tunnel driver, also from Haishuang Yan.

  10) Do not use MSI interrupts on r8169 chips before RTL8168d, from
      Heiner Kallweit.

  11) Upon bridge device init failure, we need to delete the local fdb.
      From Nikolay Aleksandrov.

  12) Handle erros from of_get_mac_address() properly in stmmac, from
      Martin Blumenstingl.

  13) Handle concurrent rename vs. dump in netfilter ipset, from Jozsef
      Kadlecsik.

  14) Setting NETIF_F_LLTX on mac80211 causes complete breakage with
      some devices, so revert. From Johannes Berg.

  15) Fix deadlock in rxrpc, from David Howells.

  16) Fix Kconfig deps of enetc driver, we must have PHYLIB. From Yue
      Haibing.

  17) Fix mvpp2 crash on module removal, from Matteo Croce.

  18) Fix race in genphy_update_link, from Heiner Kallweit.

  19) bpf_xdp_adjust_head() stopped working with generic XDP when we
      fixes generic XDP to support stacked devices properly, fix from
      Jesper Dangaard Brouer.

  20) Unbalanced RCU locking in rt6_update_exception_stamp_rt(), from
      David Ahern.

  21) Several memory leaks in new sja1105 driver, from Vladimir Oltean"

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (214 commits)
  net: dsa: sja1105: Fix memory leak on meta state machine error path
  net: dsa: sja1105: Fix memory leak on meta state machine normal path
  net: dsa: sja1105: Really fix panic on unregistering PTP clock
  net: dsa: sja1105: Use the LOCKEDS bit for SJA1105 E/T as well
  net: dsa: sja1105: Fix broken learning with vlan_filtering disabled
  net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus()
  net: sched: sample: allow accessing psample_group with rtnl
  net: sched: police: allow accessing police->params with rtnl
  net: hisilicon: Fix dma_map_single failed on arm64
  net: hisilicon: fix hip04-xmit never return TX_BUSY
  net: hisilicon: make hip04_tx_reclaim non-reentrant
  tc-testing: updated vlan action tests with batch create/delete
  net sched: update vlan action for batched events operations
  net: stmmac: tc: Do not return a fragment entry
  net: stmmac: Fix issues when number of Queues >= 4
  net: stmmac: xgmac: Fix XGMAC selftests
  be2net: disable bh with spin_lock in be_process_mcc
  net: cxgb3_main: Fix a resource leak in a error path in 'init_one()'
  net: ethernet: sun4i-emac: Support phy-handle property for finding PHYs
  net: bridge: move default pvid init/deinit to NETDEV_REGISTER/UNREGISTER
  ...
  • Loading branch information
torvalds committed Aug 7, 2019
2 parents 76d7961 + feac1d6 commit 33920f1
Show file tree
Hide file tree
Showing 225 changed files with 2,402 additions and 1,274 deletions.
23 changes: 17 additions & 6 deletions Documentation/networking/tls-offload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,24 @@ Statistics
Following minimum set of TLS-related statistics should be reported
by the driver:

* ``rx_tls_decrypted`` - number of successfully decrypted TLS segments
* ``tx_tls_encrypted`` - number of in-order TLS segments passed to device
for encryption
* ``rx_tls_decrypted_packets`` - number of successfully decrypted RX packets
which were part of a TLS stream.
* ``rx_tls_decrypted_bytes`` - number of TLS payload bytes in RX packets
which were successfully decrypted.
* ``tx_tls_encrypted_packets`` - number of TX packets passed to the device
for encryption of their TLS payload.
* ``tx_tls_encrypted_bytes`` - number of TLS payload bytes in TX packets
passed to the device for encryption.
* ``tx_tls_ctx`` - number of TLS TX HW offload contexts added to device for
encryption.
* ``tx_tls_ooo`` - number of TX packets which were part of a TLS stream
but did not arrive in the expected order
* ``tx_tls_drop_no_sync_data`` - number of TX packets dropped because
they arrived out of order and associated record could not be found
but did not arrive in the expected order.
* ``tx_tls_drop_no_sync_data`` - number of TX packets which were part of
a TLS stream dropped, because they arrived out of order and associated
record could not be found.
* ``tx_tls_drop_bypass_req`` - number of TX packets which were part of a TLS
stream dropped, because they contain both data that has been encrypted by
software and data that expects hardware crypto offload.

Notable corner cases, exceptions and additional requirements
============================================================
Expand Down
10 changes: 2 additions & 8 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6827,13 +6827,6 @@ F: Documentation/filesystems/gfs2*.txt
F: fs/gfs2/
F: include/uapi/linux/gfs2_ondisk.h

GIGASET ISDN DRIVERS
M: Paul Bolle <[email protected]>
L: [email protected]
W: http://gigaset307x.sourceforge.net/
S: Odd Fixes
F: drivers/staging/isdn/gigaset/

GNSS SUBSYSTEM
M: Johan Hovold <[email protected]>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git
Expand Down Expand Up @@ -11149,6 +11142,7 @@ L: [email protected]
S: Maintained
W: https://fedorahosted.org/dropwatch/
F: net/core/drop_monitor.c
F: include/uapi/linux/net_dropmon.h

NETWORKING DRIVERS
M: "David S. Miller" <[email protected]>
Expand Down Expand Up @@ -11287,6 +11281,7 @@ M: Aviad Yehezkel <[email protected]>
M: Dave Watson <[email protected]>
M: John Fastabend <[email protected]>
M: Daniel Borkmann <[email protected]>
M: Jakub Kicinski <[email protected]>
L: [email protected]
S: Maintained
F: net/tls/*
Expand Down Expand Up @@ -17565,7 +17560,6 @@ M: Jakub Kicinski <[email protected]>
M: Jesper Dangaard Brouer <[email protected]>
M: John Fastabend <[email protected]>
L: [email protected]
L: [email protected]
L: [email protected]
S: Supported
F: net/core/xdp.c
Expand Down
8 changes: 6 additions & 2 deletions drivers/atm/iphase.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <asm/byteorder.h>
#include <linux/vmalloc.h>
#include <linux/jiffies.h>
#include <linux/nospec.h>
#include "iphase.h"
#include "suni.h"
#define swap_byte_order(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
Expand Down Expand Up @@ -2760,8 +2761,11 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
}
if (copy_from_user(&ia_cmds, arg, sizeof ia_cmds)) return -EFAULT;
board = ia_cmds.status;
if ((board < 0) || (board > iadev_count))
board = 0;

if ((board < 0) || (board > iadev_count))
board = 0;
board = array_index_nospec(board, iadev_count + 1);

iadev = ia_dev[board];
switch (ia_cmds.cmd) {
case MEMDUMP:
Expand Down
13 changes: 12 additions & 1 deletion drivers/isdn/hardware/mISDN/hfcsusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,7 @@ start_isoc_chain(struct usb_fifo *fifo, int num_packets_per_urb,
printk(KERN_DEBUG
"%s: %s: alloc urb for fifo %i failed",
hw->name, __func__, fifo->fifonum);
continue;
}
fifo->iso[i].owner_fifo = (struct usb_fifo *) fifo;
fifo->iso[i].indx = i;
Expand Down Expand Up @@ -1692,13 +1693,23 @@ hfcsusb_stop_endpoint(struct hfcsusb *hw, int channel)
static int
setup_hfcsusb(struct hfcsusb *hw)
{
void *dmabuf = kmalloc(sizeof(u_char), GFP_KERNEL);
u_char b;
int ret;

if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s\n", hw->name, __func__);

if (!dmabuf)
return -ENOMEM;

ret = read_reg_atomic(hw, HFCUSB_CHIP_ID, dmabuf);

memcpy(&b, dmabuf, sizeof(u_char));
kfree(dmabuf);

/* check the chip id */
if (read_reg_atomic(hw, HFCUSB_CHIP_ID, &b) != 1) {
if (ret != 1) {
printk(KERN_DEBUG "%s: %s: cannot read chip id\n",
hw->name, __func__);
return 1;
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/arcnet/arc-rimi.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,13 @@ static int __init arcrimi_setup(char *s)
switch (ints[0]) {
default: /* ERROR */
pr_err("Too many arguments\n");
/* Fall through */
case 3: /* Node ID */
node = ints[3];
/* Fall through */
case 2: /* IRQ */
irq = ints[2];
/* Fall through */
case 1: /* IO address */
io = ints[1];
}
Expand Down
6 changes: 6 additions & 0 deletions drivers/net/arcnet/com20020-isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,22 @@ static int __init com20020isa_setup(char *s)
switch (ints[0]) {
default: /* ERROR */
pr_info("Too many arguments\n");
/* Fall through */
case 6: /* Timeout */
timeout = ints[6];
/* Fall through */
case 5: /* CKP value */
clockp = ints[5];
/* Fall through */
case 4: /* Backplane flag */
backplane = ints[4];
/* Fall through */
case 3: /* Node ID */
node = ints[3];
/* Fall through */
case 2: /* IRQ */
irq = ints[2];
/* Fall through */
case 1: /* IO address */
io = ints[1];
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/arcnet/com90io.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ static int __init com90io_setup(char *s)
switch (ints[0]) {
default: /* ERROR */
pr_err("Too many arguments\n");
/* Fall through */
case 2: /* IRQ */
irq = ints[2];
/* Fall through */
case 1: /* IO address */
io = ints[1];
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/arcnet/com90xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,13 @@ static int __init com90xx_setup(char *s)
switch (ints[0]) {
default: /* ERROR */
pr_err("Too many arguments\n");
/* Fall through */
case 3: /* Mem address */
shmem = ints[3];
/* Fall through */
case 2: /* IRQ */
irq = ints[2];
/* Fall through */
case 1: /* IO address */
io = ints[1];
}
Expand Down
9 changes: 9 additions & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,6 +2196,15 @@ static void bond_miimon_commit(struct bonding *bond)
bond_for_each_slave(bond, slave, iter) {
switch (slave->new_link) {
case BOND_LINK_NOCHANGE:
/* For 802.3ad mode, check current slave speed and
* duplex again in case its port was disabled after
* invalid speed/duplex reporting but recovered before
* link monitoring could make a decision on the actual
* link status
*/
if (BOND_MODE(bond) == BOND_MODE_8023AD &&
slave->link == BOND_LINK_UP)
bond_3ad_adapter_speed_duplex_changed(slave);
continue;

case BOND_LINK_UP:
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/can/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,8 @@ int register_candev(struct net_device *dev)
return -EINVAL;

dev->rtnl_link_ops = &can_link_ops;
netif_carrier_off(dev);

return register_netdev(dev);
}
EXPORT_SYMBOL_GPL(register_candev);
Expand Down
39 changes: 32 additions & 7 deletions drivers/net/can/flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,10 @@ static void flexcan_enable_wakeup_irq(struct flexcan_priv *priv, bool enable)
priv->write(reg_mcr, &regs->mcr);
}

static inline void flexcan_enter_stop_mode(struct flexcan_priv *priv)
static inline int flexcan_enter_stop_mode(struct flexcan_priv *priv)
{
struct flexcan_regs __iomem *regs = priv->regs;
unsigned int ackval;
u32 reg_mcr;

reg_mcr = priv->read(&regs->mcr);
Expand All @@ -412,20 +413,37 @@ static inline void flexcan_enter_stop_mode(struct flexcan_priv *priv)
/* enable stop request */
regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr,
1 << priv->stm.req_bit, 1 << priv->stm.req_bit);

/* get stop acknowledgment */
if (regmap_read_poll_timeout(priv->stm.gpr, priv->stm.ack_gpr,
ackval, ackval & (1 << priv->stm.ack_bit),
0, FLEXCAN_TIMEOUT_US))
return -ETIMEDOUT;

return 0;
}

static inline void flexcan_exit_stop_mode(struct flexcan_priv *priv)
static inline int flexcan_exit_stop_mode(struct flexcan_priv *priv)
{
struct flexcan_regs __iomem *regs = priv->regs;
unsigned int ackval;
u32 reg_mcr;

/* remove stop request */
regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr,
1 << priv->stm.req_bit, 0);

/* get stop acknowledgment */
if (regmap_read_poll_timeout(priv->stm.gpr, priv->stm.ack_gpr,
ackval, !(ackval & (1 << priv->stm.ack_bit)),
0, FLEXCAN_TIMEOUT_US))
return -ETIMEDOUT;

reg_mcr = priv->read(&regs->mcr);
reg_mcr &= ~FLEXCAN_MCR_SLF_WAK;
priv->write(reg_mcr, &regs->mcr);

return 0;
}

static inline void flexcan_error_irq_enable(const struct flexcan_priv *priv)
Expand Down Expand Up @@ -1437,10 +1455,10 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)

priv = netdev_priv(dev);
priv->stm.gpr = syscon_node_to_regmap(gpr_np);
of_node_put(gpr_np);
if (IS_ERR(priv->stm.gpr)) {
dev_dbg(&pdev->dev, "could not find gpr regmap\n");
return PTR_ERR(priv->stm.gpr);
ret = PTR_ERR(priv->stm.gpr);
goto out_put_node;
}

priv->stm.req_gpr = out_val[1];
Expand All @@ -1455,7 +1473,9 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)

device_set_wakeup_capable(&pdev->dev, true);

return 0;
out_put_node:
of_node_put(gpr_np);
return ret;
}

static const struct of_device_id flexcan_of_match[] = {
Expand Down Expand Up @@ -1612,7 +1632,9 @@ static int __maybe_unused flexcan_suspend(struct device *device)
*/
if (device_may_wakeup(device)) {
enable_irq_wake(dev->irq);
flexcan_enter_stop_mode(priv);
err = flexcan_enter_stop_mode(priv);
if (err)
return err;
} else {
err = flexcan_chip_disable(priv);
if (err)
Expand Down Expand Up @@ -1662,10 +1684,13 @@ static int __maybe_unused flexcan_noirq_resume(struct device *device)
{
struct net_device *dev = dev_get_drvdata(device);
struct flexcan_priv *priv = netdev_priv(dev);
int err;

if (netif_running(dev) && device_may_wakeup(device)) {
flexcan_enable_wakeup_irq(priv, false);
flexcan_exit_stop_mode(priv);
err = flexcan_exit_stop_mode(priv);
if (err)
return err;
}

return 0;
Expand Down
9 changes: 5 additions & 4 deletions drivers/net/can/rcar/rcar_canfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,10 +1508,11 @@ static int rcar_canfd_rx_poll(struct napi_struct *napi, int quota)

/* All packets processed */
if (num_pkts < quota) {
napi_complete_done(napi, num_pkts);
/* Enable Rx FIFO interrupts */
rcar_canfd_set_bit(priv->base, RCANFD_RFCC(ridx),
RCANFD_RFCC_RFIE);
if (napi_complete_done(napi, num_pkts)) {
/* Enable Rx FIFO interrupts */
rcar_canfd_set_bit(priv->base, RCANFD_RFCC(ridx),
RCANFD_RFCC_RFIE);
}
}
return num_pkts;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/sja1000/peak_pcmcia.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ static void pcan_free_channels(struct pcan_pccard *card)
if (!netdev)
continue;

strncpy(name, netdev->name, IFNAMSIZ);
strlcpy(name, netdev->name, IFNAMSIZ);

unregister_sja1000dev(netdev);

Expand Down
Loading

0 comments on commit 33920f1

Please sign in to comment.