aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-09 12:31:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-09 12:31:34 -0500
commitd1041cdc60bc122aac09f822aad1ff6c5cb84406 (patch)
treee537e5c0812f100a22512809fde0a2c0e73f5a22 /drivers
parent87df26175e67c26ccdd3a002fbbb8cde78e28a19 (diff)
parent6a17280247458ac2c302200e2d6ae36656f75bc6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix use-after-free in IPSEC input parsing, desintation address pointer was loaded before pskb_may_pull() which can change the SKB data pointers. From Florian Westphal. 2) Stack out-of-bounds read in xfrm_state_find(), from Steffen Klassert. 3) IPVS state of SKB is not properly reset when moving between namespaces, from Ye Yin. 4) Fix crash in asix driver suspend and resume, from Andrey Konovalov. 5) Don't deliver ipv6 l2tp tunnel packets to ipv4 l2tp tunnels, and vice versa, from Guillaume Nault. 6) Fix DSACK undo on non-dup ACKs, from Priyaranjan Jha. 7) Fix regression in bond_xmit_hash()'s behavior after the TCP port selection changes back in 4.2, from Hangbin Liu. 8) Two divide by zero bugs in USB networking drivers when parsing descriptors, from Bjorn Mork. 9) Fix bonding slaves being stuck in BOND_LINK_FAIL state, from Jay Vosburgh. 10) Missing skb_reset_mac_header() in qmi_wwan, from Kristian Evensen. 11) Fix the destruction of tc action object races properly, from Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (31 commits) cls_u32: use tcf_exts_get_net() before call_rcu() cls_tcindex: use tcf_exts_get_net() before call_rcu() cls_rsvp: use tcf_exts_get_net() before call_rcu() cls_route: use tcf_exts_get_net() before call_rcu() cls_matchall: use tcf_exts_get_net() before call_rcu() cls_fw: use tcf_exts_get_net() before call_rcu() cls_flower: use tcf_exts_get_net() before call_rcu() cls_flow: use tcf_exts_get_net() before call_rcu() cls_cgroup: use tcf_exts_get_net() before call_rcu() cls_bpf: use tcf_exts_get_net() before call_rcu() cls_basic: use tcf_exts_get_net() before call_rcu() net_sched: introduce tcf_exts_get_net() and tcf_exts_put_net() Revert "net_sched: hold netns refcnt for each action" net: usb: asix: fill null-ptr-deref in asix_suspend Revert "net: usb: asix: fill null-ptr-deref in asix_suspend" qmi_wwan: Add missing skb_reset_mac_header-call bonding: fix slave stuck in BOND_LINK_FAIL state qrtr: Move to postcore_initcall net: qmi_wwan: fix divide by 0 on bad descriptors net: cdc_ether: fix divide by 0 on bad descriptors ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_main.c3
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h6
-rw-r--r--drivers/net/ethernet/marvell/mvpp2.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_fs.c13
-rw-r--r--drivers/net/usb/asix_devices.c4
-rw-r--r--drivers/net/usb/cdc_ether.c2
-rw-r--r--drivers/net/usb/qmi_wwan.c3
7 files changed, 22 insertions, 13 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index c99dc59d729b..b2db581131b2 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2042,6 +2042,7 @@ static int bond_miimon_inspect(struct bonding *bond)
2042 2042
2043 bond_for_each_slave_rcu(bond, slave, iter) { 2043 bond_for_each_slave_rcu(bond, slave, iter) {
2044 slave->new_link = BOND_LINK_NOCHANGE; 2044 slave->new_link = BOND_LINK_NOCHANGE;
2045 slave->link_new_state = slave->link;
2045 2046
2046 link_state = bond_check_dev_link(bond, slave->dev, 0); 2047 link_state = bond_check_dev_link(bond, slave->dev, 0);
2047 2048
@@ -3253,7 +3254,7 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb)
3253 hash ^= (hash >> 16); 3254 hash ^= (hash >> 16);
3254 hash ^= (hash >> 8); 3255 hash ^= (hash >> 8);
3255 3256
3256 return hash; 3257 return hash >> 1;
3257} 3258}
3258 3259
3259/*-------------------------- Device entry points ----------------------------*/ 3260/*-------------------------- Device entry points ----------------------------*/
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h b/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h
index f2d623a7aee0..123e2c1b65f5 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h
@@ -37,7 +37,7 @@
37 37
38#define T4FW_VERSION_MAJOR 0x01 38#define T4FW_VERSION_MAJOR 0x01
39#define T4FW_VERSION_MINOR 0x10 39#define T4FW_VERSION_MINOR 0x10
40#define T4FW_VERSION_MICRO 0x2D 40#define T4FW_VERSION_MICRO 0x3F
41#define T4FW_VERSION_BUILD 0x00 41#define T4FW_VERSION_BUILD 0x00
42 42
43#define T4FW_MIN_VERSION_MAJOR 0x01 43#define T4FW_MIN_VERSION_MAJOR 0x01
@@ -46,7 +46,7 @@
46 46
47#define T5FW_VERSION_MAJOR 0x01 47#define T5FW_VERSION_MAJOR 0x01
48#define T5FW_VERSION_MINOR 0x10 48#define T5FW_VERSION_MINOR 0x10
49#define T5FW_VERSION_MICRO 0x2D 49#define T5FW_VERSION_MICRO 0x3F
50#define T5FW_VERSION_BUILD 0x00 50#define T5FW_VERSION_BUILD 0x00
51 51
52#define T5FW_MIN_VERSION_MAJOR 0x00 52#define T5FW_MIN_VERSION_MAJOR 0x00
@@ -55,7 +55,7 @@
55 55
56#define T6FW_VERSION_MAJOR 0x01 56#define T6FW_VERSION_MAJOR 0x01
57#define T6FW_VERSION_MINOR 0x10 57#define T6FW_VERSION_MINOR 0x10
58#define T6FW_VERSION_MICRO 0x2D 58#define T6FW_VERSION_MICRO 0x3F
59#define T6FW_VERSION_BUILD 0x00 59#define T6FW_VERSION_BUILD 0x00
60 60
61#define T6FW_MIN_VERSION_MAJOR 0x00 61#define T6FW_MIN_VERSION_MAJOR 0x00
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index a37af5813f33..fcf9ba5eb8d1 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -6747,6 +6747,9 @@ static int mvpp2_irqs_init(struct mvpp2_port *port)
6747 for (i = 0; i < port->nqvecs; i++) { 6747 for (i = 0; i < port->nqvecs; i++) {
6748 struct mvpp2_queue_vector *qv = port->qvecs + i; 6748 struct mvpp2_queue_vector *qv = port->qvecs + i;
6749 6749
6750 if (qv->type == MVPP2_QUEUE_VECTOR_PRIVATE)
6751 irq_set_status_flags(qv->irq, IRQ_NO_BALANCING);
6752
6750 err = request_irq(qv->irq, mvpp2_isr, 0, port->dev->name, qv); 6753 err = request_irq(qv->irq, mvpp2_isr, 0, port->dev->name, qv);
6751 if (err) 6754 if (err)
6752 goto err; 6755 goto err;
@@ -6776,6 +6779,7 @@ static void mvpp2_irqs_deinit(struct mvpp2_port *port)
6776 struct mvpp2_queue_vector *qv = port->qvecs + i; 6779 struct mvpp2_queue_vector *qv = port->qvecs + i;
6777 6780
6778 irq_set_affinity_hint(qv->irq, NULL); 6781 irq_set_affinity_hint(qv->irq, NULL);
6782 irq_clear_status_flags(qv->irq, IRQ_NO_BALANCING);
6779 free_irq(qv->irq, qv); 6783 free_irq(qv->irq, qv);
6780 } 6784 }
6781} 6785}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
index 850cdc980ab5..4837045ffba3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
@@ -365,21 +365,24 @@ static void mlx5e_execute_l2_action(struct mlx5e_priv *priv,
365 struct mlx5e_l2_hash_node *hn) 365 struct mlx5e_l2_hash_node *hn)
366{ 366{
367 u8 action = hn->action; 367 u8 action = hn->action;
368 u8 mac_addr[ETH_ALEN];
368 int l2_err = 0; 369 int l2_err = 0;
369 370
371 ether_addr_copy(mac_addr, hn->ai.addr);
372
370 switch (action) { 373 switch (action) {
371 case MLX5E_ACTION_ADD: 374 case MLX5E_ACTION_ADD:
372 mlx5e_add_l2_flow_rule(priv, &hn->ai, MLX5E_FULLMATCH); 375 mlx5e_add_l2_flow_rule(priv, &hn->ai, MLX5E_FULLMATCH);
373 if (!is_multicast_ether_addr(hn->ai.addr)) { 376 if (!is_multicast_ether_addr(mac_addr)) {
374 l2_err = mlx5_mpfs_add_mac(priv->mdev, hn->ai.addr); 377 l2_err = mlx5_mpfs_add_mac(priv->mdev, mac_addr);
375 hn->mpfs = !l2_err; 378 hn->mpfs = !l2_err;
376 } 379 }
377 hn->action = MLX5E_ACTION_NONE; 380 hn->action = MLX5E_ACTION_NONE;
378 break; 381 break;
379 382
380 case MLX5E_ACTION_DEL: 383 case MLX5E_ACTION_DEL:
381 if (!is_multicast_ether_addr(hn->ai.addr) && hn->mpfs) 384 if (!is_multicast_ether_addr(mac_addr) && hn->mpfs)
382 l2_err = mlx5_mpfs_del_mac(priv->mdev, hn->ai.addr); 385 l2_err = mlx5_mpfs_del_mac(priv->mdev, mac_addr);
383 mlx5e_del_l2_flow_rule(priv, &hn->ai); 386 mlx5e_del_l2_flow_rule(priv, &hn->ai);
384 mlx5e_del_l2_from_hash(hn); 387 mlx5e_del_l2_from_hash(hn);
385 break; 388 break;
@@ -387,7 +390,7 @@ static void mlx5e_execute_l2_action(struct mlx5e_priv *priv,
387 390
388 if (l2_err) 391 if (l2_err)
389 netdev_warn(priv->netdev, "MPFS, failed to %s mac %pM, err(%d)\n", 392 netdev_warn(priv->netdev, "MPFS, failed to %s mac %pM, err(%d)\n",
390 action == MLX5E_ACTION_ADD ? "add" : "del", hn->ai.addr, l2_err); 393 action == MLX5E_ACTION_ADD ? "add" : "del", mac_addr, l2_err);
391} 394}
392 395
393static void mlx5e_sync_netdev_addr(struct mlx5e_priv *priv) 396static void mlx5e_sync_netdev_addr(struct mlx5e_priv *priv)
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index b2ff88e69a81..3d4f7959dabb 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -626,7 +626,7 @@ static int asix_suspend(struct usb_interface *intf, pm_message_t message)
626 struct usbnet *dev = usb_get_intfdata(intf); 626 struct usbnet *dev = usb_get_intfdata(intf);
627 struct asix_common_private *priv = dev->driver_priv; 627 struct asix_common_private *priv = dev->driver_priv;
628 628
629 if (priv->suspend) 629 if (priv && priv->suspend)
630 priv->suspend(dev); 630 priv->suspend(dev);
631 631
632 return usbnet_suspend(intf, message); 632 return usbnet_suspend(intf, message);
@@ -678,7 +678,7 @@ static int asix_resume(struct usb_interface *intf)
678 struct usbnet *dev = usb_get_intfdata(intf); 678 struct usbnet *dev = usb_get_intfdata(intf);
679 struct asix_common_private *priv = dev->driver_priv; 679 struct asix_common_private *priv = dev->driver_priv;
680 680
681 if (priv->resume) 681 if (priv && priv->resume)
682 priv->resume(dev); 682 priv->resume(dev);
683 683
684 return usbnet_resume(intf); 684 return usbnet_resume(intf);
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 3e7a3ac3a362..05dca3e5c93d 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -230,7 +230,7 @@ skip:
230 goto bad_desc; 230 goto bad_desc;
231 } 231 }
232 232
233 if (header.usb_cdc_ether_desc) { 233 if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) {
234 dev->hard_mtu = le16_to_cpu(info->ether->wMaxSegmentSize); 234 dev->hard_mtu = le16_to_cpu(info->ether->wMaxSegmentSize);
235 /* because of Zaurus, we may be ignoring the host 235 /* because of Zaurus, we may be ignoring the host
236 * side link address we were given. 236 * side link address we were given.
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 8c3733608271..8d4a6f7cba61 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -499,6 +499,7 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
499 return 1; 499 return 1;
500 } 500 }
501 if (rawip) { 501 if (rawip) {
502 skb_reset_mac_header(skb);
502 skb->dev = dev->net; /* normally set by eth_type_trans */ 503 skb->dev = dev->net; /* normally set by eth_type_trans */
503 skb->protocol = proto; 504 skb->protocol = proto;
504 return 1; 505 return 1;
@@ -681,7 +682,7 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
681 } 682 }
682 683
683 /* errors aren't fatal - we can live with the dynamic address */ 684 /* errors aren't fatal - we can live with the dynamic address */
684 if (cdc_ether) { 685 if (cdc_ether && cdc_ether->wMaxSegmentSize) {
685 dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize); 686 dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize);
686 usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress); 687 usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress);
687 } 688 }