From: David S. Miller Date: Fri, 15 Feb 2019 20:38:38 +0000 (-0800) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3313da8188cc346a205783c22c37e821b4b7016d;p=linux.git Merge git://git./linux/kernel/git/davem/net The netfilter conflicts were rather simple overlapping changes. However, the cls_tcindex.c stuff was a bit more complex. On the 'net' side, Cong is fixing several races and memory leaks. Whilst on the 'net-next' side we have Vlad adding the rtnl-ness support. What I've decided to do, in order to resolve this, is revert the conversion over to using a workqueue that Cong did, bringing us back to pure RCU. I did it this way because I believe that either Cong's races don't apply with have Vlad did things, or Cong will have to implement the race fix slightly differently. Signed-off-by: David S. Miller --- 3313da8188cc346a205783c22c37e821b4b7016d diff --cc include/linux/phy.h index 177a330d84e59,127fcc9c37781..bf1070c2a53b4 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@@ -673,16 -673,7 +673,9 @@@ phy_lookup_setting(int speed, int duple bool exact); size_t phy_speeds(unsigned int *speeds, size_t size, unsigned long *mask); +void of_set_phy_supported(struct phy_device *phydev); +void of_set_phy_eee_broken(struct phy_device *phydev); - static inline bool __phy_is_started(struct phy_device *phydev) - { - WARN_ON(!mutex_is_locked(&phydev->lock)); - - return phydev->state >= PHY_UP; - } - /** * phy_is_started - Convenience function to check whether PHY is started * @phydev: The phy_device struct diff --cc net/batman-adv/soft-interface.c index 5cb4a2f53a2f8,ffc83bebfe403..2e367230376b9 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@@ -226,15 -225,14 +226,17 @@@ static netdev_tx_t batadv_interface_tx( skb_reset_mac_header(skb); ethhdr = eth_hdr(skb); - switch (ntohs(ethhdr->h_proto)) { + proto = ethhdr->h_proto; + + switch (ntohs(proto)) { case ETH_P_8021Q: + if (!pskb_may_pull(skb, sizeof(*vhdr))) + goto dropped; vhdr = vlan_eth_hdr(skb); + proto = vhdr->h_vlan_encapsulated_proto; /* drop batman-in-batman packets to prevent loops */ - if (vhdr->h_vlan_encapsulated_proto != htons(ETH_P_BATMAN)) { + if (proto != htons(ETH_P_BATMAN)) { network_offset += VLAN_HLEN; break; } diff --cc net/ipv4/netfilter/nf_nat_l3proto_ipv4.c index e26165af45cbf,fa2ba7c500e41..4b07eb8a9b185 --- a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c @@@ -214,7 -214,8 +214,8 @@@ int nf_nat_icmp_reply_translation(struc } /* Change outer to look like the reply to an incoming packet */ - nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); + nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple); + target.dst.protonum = IPPROTO_ICMP; if (!nf_nat_ipv4_manip_pkt(skb, 0, &target, manip)) return 0; diff --cc net/ipv6/netfilter/nf_nat_l3proto_ipv6.c index 9c914db44bec7,7a41ee3c11b4d..f0ec31933c15a --- a/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c @@@ -225,7 -225,8 +225,8 @@@ int nf_nat_icmpv6_reply_translation(str skb->len - hdrlen, 0)); } - nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); + nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple); + target.dst.protonum = IPPROTO_ICMPV6; if (!nf_nat_ipv6_manip_pkt(skb, 0, &target, manip)) return 0; diff --cc net/smc/smc_cdc.c index 28bbdb04bc35d,fb07ad8d69a62..d0b0f4c865b40 --- a/net/smc/smc_cdc.c +++ b/net/smc/smc_cdc.c @@@ -101,14 -101,10 +101,12 @@@ int smc_cdc_msg_send(struct smc_connect conn->tx_cdc_seq++; conn->local_tx_ctrl.seqno = conn->tx_cdc_seq; - smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, - &conn->local_tx_ctrl, conn); - smc_curs_copy(&cfed, &((struct smc_host_cdc_msg *)wr_buf)->cons, conn); + smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed); rc = smc_wr_tx_send(link, (struct smc_wr_tx_pend_priv *)pend); - if (!rc) + if (!rc) { smc_curs_copy(&conn->rx_curs_confirmed, &cfed, conn); + conn->local_rx_ctrl.prod_flags.cons_curs_upd_req = 0; + } return rc; }