From: David S. Miller Date: Fri, 30 Jun 2017 16:43:08 +0000 (-0400) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b07911593719828cac023bdcf6bf4da1c9ba546f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge git://git./linux/kernel/git/davem/net A set of overlapping changes in macvlan and the rocker driver, nothing serious. Signed-off-by: David S. Miller --- b07911593719828cac023bdcf6bf4da1c9ba546f diff --cc drivers/net/arcnet/com20020-pci.c index 24deb88a37f0,47f80b83dcf4..2d956cb59d06 --- a/drivers/net/arcnet/com20020-pci.c +++ b/drivers/net/arcnet/com20020-pci.c @@@ -187,9 -167,9 +188,10 @@@ static int com20020pci_probe(struct pci arcnet_outb(0x00, ioaddr, COM20020_REG_W_COMMAND); arcnet_inb(ioaddr, COM20020_REG_R_DIAGSTAT); + SET_NETDEV_DEV(dev, &pdev->dev); dev->base_addr = ioaddr; dev->dev_addr[0] = node; + dev->sysfs_groups[0] = &com20020_state_group; dev->irq = pdev->irq; lp->card_name = "PCI COM20020"; lp->card_flags = ci->flags; @@@ -199,15 -179,10 +201,15 @@@ lp->timeout = timeout; lp->hw.owner = THIS_MODULE; + lp->backplane = (inb(priv->misc) >> (2 + i)) & 0x1; + + if (!strncmp(ci->name, "EAE PLX-PCI FB2", 15)) + lp->backplane = 1; + /* Get the dev_id from the PLX rotary coder */ if (!strncmp(ci->name, "EAE PLX-PCI MA1", 15)) - dev->dev_id = 0xc; - dev->dev_id ^= inb(priv->misc + ci->rotary) >> 4; + dev_id_mask = 0x3; + dev->dev_id = (inb(priv->misc + ci->rotary) >> 4) & dev_id_mask; snprintf(dev->name, sizeof(dev->name), "arc%d-%d", dev->dev_id, i); diff --cc drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 700cc8c6aa5b,0744452a0b18..192cb93e7669 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@@ -3299,11 -3331,15 +3299,14 @@@ static int mlxsw_sp_inetaddr_vlan_event unsigned long event) { struct net_device *real_dev = vlan_dev_real_dev(vlan_dev); - struct mlxsw_sp *mlxsw_sp = mlxsw_sp_lower_get(vlan_dev); u16 vid = vlan_dev_vlan_id(vlan_dev); + if (netif_is_bridge_port(vlan_dev)) + return 0; + if (mlxsw_sp_port_dev_check(real_dev)) - return mlxsw_sp_inetaddr_vport_event(vlan_dev, real_dev, event, - vid); + return mlxsw_sp_inetaddr_port_vlan_event(vlan_dev, real_dev, + event, vid); else if (netif_is_lag_master(real_dev)) return __mlxsw_sp_inetaddr_lag_event(vlan_dev, real_dev, event, vid); diff --cc drivers/net/ethernet/rocker/rocker_ofdpa.c index bd0e3f157e9e,a9ce82d3e9cf..600e30e8f0be --- a/drivers/net/ethernet/rocker/rocker_ofdpa.c +++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c @@@ -1409,10 -1505,10 +1409,10 @@@ static int ofdpa_port_ipv4_nh(struct of *index = entry->index; resolved = false; } else if (removing) { - ofdpa_neigh_del(found); *index = found->index; - ofdpa_neigh_del(trans, found); ++ ofdpa_neigh_del(found); } else if (updating) { - ofdpa_neigh_update(found, trans, NULL, false); + ofdpa_neigh_update(found, NULL, false); resolved = !is_zero_ether_addr(found->eth_dst); *index = found->index; } else { diff --cc drivers/net/macvlan.c index 9ffff0362a11,72b801803aa4..0f581ee74fe4 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@@ -703,8 -743,15 +743,14 @@@ static int macvlan_set_mac_address(stru if (!is_valid_ether_addr(addr->sa_data)) return -EADDRNOTAVAIL; - if (vlan->mode == MACVLAN_MODE_PASSTHRU) + /* If the addresses are the same, this is a no-op */ + if (ether_addr_equal(dev->dev_addr, addr->sa_data)) + return 0; + + if (vlan->mode == MACVLAN_MODE_PASSTHRU) { + macvlan_set_addr_change(vlan->port); - dev_set_mac_address(vlan->lowerdev, addr); - return 0; + return dev_set_mac_address(vlan->lowerdev, addr); + } return macvlan_sync_address(dev, addr->sa_data); } diff --cc kernel/bpf/verifier.c index 74ea96ea391b,a8a725697bed..6ea2adcb233b --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@@ -1016,8 -989,13 +1016,13 @@@ static int check_xadd(struct bpf_verifi if (err) return err; + if (is_pointer_value(env, insn->src_reg)) { + verbose("R%d leaks addr into mem\n", insn->src_reg); + return -EACCES; + } + /* check whether atomic_add can read the memory */ - err = check_mem_access(env, insn->dst_reg, insn->off, + err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off, BPF_SIZE(insn->code), BPF_READ, -1); if (err) return err; diff --cc net/xfrm/xfrm_device.c index 6d4a60d1bf19,5aba03685d7d..5f7e8bfa0c2d --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@@ -137,8 -138,9 +138,9 @@@ ok return true; } EXPORT_SYMBOL_GPL(xfrm_dev_offload_ok); + #endif -int xfrm_dev_register(struct net_device *dev) +static int xfrm_dev_register(struct net_device *dev) { if ((dev->features & NETIF_F_HW_ESP) && !dev->xfrmdev_ops) return NOTIFY_BAD;