aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-03 12:09:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-03 12:09:21 -0400
commit7ba3ebff9c09fa461e7c2d186b81f7af61910abe (patch)
tree07c585a1f345f6e8212137e0f991511fc817243f /drivers
parentf0395d5b4d691164a6e4d107590636db80b29bf6 (diff)
parent93824c80bf47ebe087414b3a40ca0ff9aab7d1fb (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Hopefully this is the last batch of networking fixes for 4.14 Fingers crossed... 1) Fix stmmac to use the proper sized OF property read, from Bhadram Varka. 2) Fix use after free in net scheduler tc action code, from Cong Wang. 3) Fix SKB control block mangling in tcp_make_synack(). 4) Use proper locking in fib_dump_info(), from Florian Westphal. 5) Fix IPG encodings in systemport driver, from Florian Fainelli. 6) Fix division by zero in NV TCP congestion control module, from Konstantin Khlebnikov. 7) Fix use after free in nf_reject_ipv4, from Tejaswi Tanikella" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: systemport: Correct IPG length settings tcp: do not mangle skb->cb[] in tcp_make_synack() fib: fib_dump_info can no longer use __in_dev_get_rtnl stmmac: use of_property_read_u32 instead of read_u8 net_sched: hold netns refcnt for each action net_sched: acquire RTNL in tc_action_net_exit() net: vrf: correct FRA_L3MDEV encode type tcp_nv: fix division by zero in tcpnv_acked() netfilter: nf_reject_ipv4: Fix use-after-free in send_reset netfilter: nft_set_hash: disable fast_ops for 2-len keys
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.c10
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c16
-rw-r--r--drivers/net/vrf.c2
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 83eec9a8c275..eb441e5e2cd8 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -1809,15 +1809,17 @@ static inline void bcm_sysport_mask_all_intrs(struct bcm_sysport_priv *priv)
1809 1809
1810static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv) 1810static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv)
1811{ 1811{
1812 u32 __maybe_unused reg; 1812 u32 reg;
1813 1813
1814 /* Include Broadcom tag in pad extension */ 1814 reg = gib_readl(priv, GIB_CONTROL);
1815 /* Include Broadcom tag in pad extension and fix up IPG_LENGTH */
1815 if (netdev_uses_dsa(priv->netdev)) { 1816 if (netdev_uses_dsa(priv->netdev)) {
1816 reg = gib_readl(priv, GIB_CONTROL);
1817 reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT); 1817 reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT);
1818 reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT; 1818 reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT;
1819 gib_writel(priv, reg, GIB_CONTROL);
1820 } 1819 }
1820 reg &= ~(GIB_IPG_LEN_MASK << GIB_IPG_LEN_SHIFT);
1821 reg |= 12 << GIB_IPG_LEN_SHIFT;
1822 gib_writel(priv, reg, GIB_CONTROL);
1821} 1823}
1822 1824
1823static int bcm_sysport_open(struct net_device *dev) 1825static int bcm_sysport_open(struct net_device *dev)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 6383695004a5..195eb7e71473 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -168,8 +168,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
168 } 168 }
169 169
170 /* Processing RX queues common config */ 170 /* Processing RX queues common config */
171 if (of_property_read_u8(rx_node, "snps,rx-queues-to-use", 171 if (of_property_read_u32(rx_node, "snps,rx-queues-to-use",
172 &plat->rx_queues_to_use)) 172 &plat->rx_queues_to_use))
173 plat->rx_queues_to_use = 1; 173 plat->rx_queues_to_use = 1;
174 174
175 if (of_property_read_bool(rx_node, "snps,rx-sched-sp")) 175 if (of_property_read_bool(rx_node, "snps,rx-sched-sp"))
@@ -191,8 +191,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
191 else 191 else
192 plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; 192 plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB;
193 193
194 if (of_property_read_u8(q_node, "snps,map-to-dma-channel", 194 if (of_property_read_u32(q_node, "snps,map-to-dma-channel",
195 &plat->rx_queues_cfg[queue].chan)) 195 &plat->rx_queues_cfg[queue].chan))
196 plat->rx_queues_cfg[queue].chan = queue; 196 plat->rx_queues_cfg[queue].chan = queue;
197 /* TODO: Dynamic mapping to be included in the future */ 197 /* TODO: Dynamic mapping to be included in the future */
198 198
@@ -222,8 +222,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
222 } 222 }
223 223
224 /* Processing TX queues common config */ 224 /* Processing TX queues common config */
225 if (of_property_read_u8(tx_node, "snps,tx-queues-to-use", 225 if (of_property_read_u32(tx_node, "snps,tx-queues-to-use",
226 &plat->tx_queues_to_use)) 226 &plat->tx_queues_to_use))
227 plat->tx_queues_to_use = 1; 227 plat->tx_queues_to_use = 1;
228 228
229 if (of_property_read_bool(tx_node, "snps,tx-sched-wrr")) 229 if (of_property_read_bool(tx_node, "snps,tx-sched-wrr"))
@@ -244,8 +244,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
244 if (queue >= plat->tx_queues_to_use) 244 if (queue >= plat->tx_queues_to_use)
245 break; 245 break;
246 246
247 if (of_property_read_u8(q_node, "snps,weight", 247 if (of_property_read_u32(q_node, "snps,weight",
248 &plat->tx_queues_cfg[queue].weight)) 248 &plat->tx_queues_cfg[queue].weight))
249 plat->tx_queues_cfg[queue].weight = 0x10 + queue; 249 plat->tx_queues_cfg[queue].weight = 0x10 + queue;
250 250
251 if (of_property_read_bool(q_node, "snps,dcb-algorithm")) { 251 if (of_property_read_bool(q_node, "snps,dcb-algorithm")) {
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 9b243e6f3008..7dc3bcac3506 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1165,7 +1165,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it)
1165 frh->family = family; 1165 frh->family = family;
1166 frh->action = FR_ACT_TO_TBL; 1166 frh->action = FR_ACT_TO_TBL;
1167 1167
1168 if (nla_put_u32(skb, FRA_L3MDEV, 1)) 1168 if (nla_put_u8(skb, FRA_L3MDEV, 1))
1169 goto nla_put_failure; 1169 goto nla_put_failure;
1170 1170
1171 if (nla_put_u32(skb, FRA_PRIORITY, FIB_RULE_PREF)) 1171 if (nla_put_u32(skb, FRA_PRIORITY, FIB_RULE_PREF))