Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Fri, 6 Oct 2017 00:57:03 +0000 (17:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Oct 2017 01:19:22 +0000 (18:19 -0700)
Just simple overlapping changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
25 files changed:
1  2 
MAINTAINERS
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/marvell/mvpp2.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
drivers/net/tun.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
include/net/tcp.h
include/uapi/linux/bpf.h
kernel/bpf/core.c
kernel/cgroup/cgroup.c
lib/kobject_uevent.c
net/core/filter.c
net/core/rtnetlink.c
net/dsa/slave.c
net/ipv4/inetpeer.c
net/ipv4/ip_gre.c
net/ipv4/ip_vti.c
net/ipv4/tcp_ipv4.c
net/ipv4/udp.c
net/ipv6/ip6_gre.c
net/ipv6/ip6_tunnel.c
net/ipv6/ip6_vti.c
net/packet/af_packet.c

diff --cc MAINTAINERS
Simple merge
Simple merge
@@@ -5397,13 -5107,8 +5407,12 @@@ mlxsw_sp_rif_create(struct mlxsw_sp *ml
        if (err)
                goto err_configure;
  
 +      err = mlxsw_sp_mr_rif_add(vr->mr4_table, rif);
 +      if (err)
 +              goto err_mr_rif_add;
 +
        mlxsw_sp_rif_counters_alloc(rif);
        mlxsw_sp->router->rifs[rif_index] = rif;
-       vr->rif_count++;
  
        return rif;
  
@@@ -5430,10 -5134,8 +5440,9 @@@ void mlxsw_sp_rif_destroy(struct mlxsw_
        mlxsw_sp_router_rif_gone_sync(mlxsw_sp, rif);
        vr = &mlxsw_sp->router->vrs[rif->vr_id];
  
-       vr->rif_count--;
        mlxsw_sp->router->rifs[rif->rif_index] = NULL;
        mlxsw_sp_rif_counters_free(rif);
 +      mlxsw_sp_mr_rif_del(vr->mr4_table, rif);
        ops->deconfigure(rif);
        if (fid)
                /* Loopback RIFs are not associated with a FID. */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -294,55 -294,26 +294,75 @@@ static void cleanup_uevent_env(struct s
  }
  #endif
  
 +static int kobject_uevent_net_broadcast(struct kobject *kobj,
 +                                      struct kobj_uevent_env *env,
 +                                      const char *action_string,
 +                                      const char *devpath)
 +{
 +      int retval = 0;
 +#if defined(CONFIG_NET)
 +      struct sk_buff *skb = NULL;
 +      struct uevent_sock *ue_sk;
 +
 +      /* send netlink message */
 +      list_for_each_entry(ue_sk, &uevent_sock_list, list) {
 +              struct sock *uevent_sock = ue_sk->sk;
 +
 +              if (!netlink_has_listeners(uevent_sock, 1))
 +                      continue;
 +
 +              if (!skb) {
 +                      /* allocate message with the maximum possible size */
 +                      size_t len = strlen(action_string) + strlen(devpath) + 2;
 +                      char *scratch;
 +
 +                      retval = -ENOMEM;
 +                      skb = alloc_skb(len + env->buflen, GFP_KERNEL);
 +                      if (!skb)
 +                              continue;
 +
 +                      /* add header */
 +                      scratch = skb_put(skb, len);
 +                      sprintf(scratch, "%s@%s", action_string, devpath);
 +
 +                      skb_put_data(skb, env->buf, env->buflen);
 +
 +                      NETLINK_CB(skb).dst_group = 1;
 +              }
 +
 +              retval = netlink_broadcast_filtered(uevent_sock, skb_get(skb),
 +                                                  0, 1, GFP_KERNEL,
 +                                                  kobj_bcast_filter,
 +                                                  kobj);
 +              /* ENOBUFS should be handled in userspace */
 +              if (retval == -ENOBUFS || retval == -ESRCH)
 +                      retval = 0;
 +      }
 +      consume_skb(skb);
 +#endif
 +      return retval;
 +}
 +
+ static void zap_modalias_env(struct kobj_uevent_env *env)
+ {
+       static const char modalias_prefix[] = "MODALIAS=";
+       int i;
+       for (i = 0; i < env->envp_idx;) {
+               if (strncmp(env->envp[i], modalias_prefix,
+                           sizeof(modalias_prefix) - 1)) {
+                       i++;
+                       continue;
+               }
+               if (i != env->envp_idx - 1)
+                       memmove(&env->envp[i], &env->envp[i + 1],
+                               sizeof(env->envp[i]) * env->envp_idx - 1);
+               env->envp_idx--;
+       }
+ }
  /**
   * kobject_uevent_env - send an uevent with environmental data
   *
Simple merge
Simple merge
diff --cc net/dsa/slave.c
@@@ -1171,25 -1304,30 +1171,30 @@@ int dsa_slave_create(struct dsa_port *p
  
        netif_carrier_off(slave_dev);
  
 -      ret = dsa_slave_phy_setup(p, slave_dev);
 +      ret = dsa_slave_phy_setup(slave_dev);
        if (ret) {
                netdev_err(master, "error %d setting up slave phy\n", ret);
-               unregister_netdev(slave_dev);
-               free_percpu(p->stats64);
-               free_netdev(slave_dev);
-               return ret;
+               goto out_free;
+       }
+       ret = register_netdev(slave_dev);
+       if (ret) {
+               netdev_err(master, "error %d registering interface %s\n",
+                          ret, slave_dev->name);
+               goto out_phy;
        }
  
        return 0;
 -      phy_disconnect(p->phy);
+ out_phy:
++      phy_disconnect(slave_dev->phydev);
+       if (of_phy_is_fixed_link(p->dp->dn))
+               of_phy_deregister_fixed_link(p->dp->dn);
+ out_free:
+       free_percpu(p->stats64);
+       free_netdev(slave_dev);
+       port->netdev = NULL;
+       return ret;
  }
  
  void dsa_slave_destroy(struct net_device *slave_dev)
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv4/udp.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge