]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Apr 2019 10:32:47 +0000 (12:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Apr 2019 10:32:47 +0000 (12:32 +0200)
added patches:
ipv4-add-sanity-checks-in-ipv4_link_failure.patch
ipv4-set-the-tcp_min_rtt_wlen-range-from-0-to-one-day.patch
mlxsw-spectrum-fix-autoneg-status-in-ethtool.patch
net-mlx5e-ethtool-remove-unsupported-sfp-eeprom-high-pages-query.patch
net-rds-exchange-of-8k-and-1m-pool.patch
net-stmmac-move-stmmac_check_ether_addr-to-driver-probe.patch
team-fix-possible-recursive-locking-when-add-slaves.patch

queue-4.9/ipv4-add-sanity-checks-in-ipv4_link_failure.patch [new file with mode: 0644]
queue-4.9/ipv4-set-the-tcp_min_rtt_wlen-range-from-0-to-one-day.patch [new file with mode: 0644]
queue-4.9/mlxsw-spectrum-fix-autoneg-status-in-ethtool.patch [new file with mode: 0644]
queue-4.9/net-mlx5e-ethtool-remove-unsupported-sfp-eeprom-high-pages-query.patch [new file with mode: 0644]
queue-4.9/net-rds-exchange-of-8k-and-1m-pool.patch [new file with mode: 0644]
queue-4.9/net-stmmac-move-stmmac_check_ether_addr-to-driver-probe.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/team-fix-possible-recursive-locking-when-add-slaves.patch [new file with mode: 0644]

diff --git a/queue-4.9/ipv4-add-sanity-checks-in-ipv4_link_failure.patch b/queue-4.9/ipv4-add-sanity-checks-in-ipv4_link_failure.patch
new file mode 100644 (file)
index 0000000..8048104
--- /dev/null
@@ -0,0 +1,154 @@
+From foo@baz Tue 30 Apr 2019 11:31:40 AM CEST
+From: Eric Dumazet <edumazet@google.com>
+Date: Wed, 24 Apr 2019 08:04:05 -0700
+Subject: ipv4: add sanity checks in ipv4_link_failure()
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit 20ff83f10f113c88d0bb74589389b05250994c16 ]
+
+Before calling __ip_options_compile(), we need to ensure the network
+header is a an IPv4 one, and that it is already pulled in skb->head.
+
+RAW sockets going through a tunnel can end up calling ipv4_link_failure()
+with total garbage in the skb, or arbitrary lengthes.
+
+syzbot report :
+
+BUG: KASAN: stack-out-of-bounds in memcpy include/linux/string.h:355 [inline]
+BUG: KASAN: stack-out-of-bounds in __ip_options_echo+0x294/0x1120 net/ipv4/ip_options.c:123
+Write of size 69 at addr ffff888096abf068 by task syz-executor.4/9204
+
+CPU: 0 PID: 9204 Comm: syz-executor.4 Not tainted 5.1.0-rc5+ #77
+Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
+Call Trace:
+ __dump_stack lib/dump_stack.c:77 [inline]
+ dump_stack+0x172/0x1f0 lib/dump_stack.c:113
+ print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
+ kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
+ check_memory_region_inline mm/kasan/generic.c:185 [inline]
+ check_memory_region+0x123/0x190 mm/kasan/generic.c:191
+ memcpy+0x38/0x50 mm/kasan/common.c:133
+ memcpy include/linux/string.h:355 [inline]
+ __ip_options_echo+0x294/0x1120 net/ipv4/ip_options.c:123
+ __icmp_send+0x725/0x1400 net/ipv4/icmp.c:695
+ ipv4_link_failure+0x29f/0x550 net/ipv4/route.c:1204
+ dst_link_failure include/net/dst.h:427 [inline]
+ vti6_xmit net/ipv6/ip6_vti.c:514 [inline]
+ vti6_tnl_xmit+0x10d4/0x1c0c net/ipv6/ip6_vti.c:553
+ __netdev_start_xmit include/linux/netdevice.h:4414 [inline]
+ netdev_start_xmit include/linux/netdevice.h:4423 [inline]
+ xmit_one net/core/dev.c:3292 [inline]
+ dev_hard_start_xmit+0x1b2/0x980 net/core/dev.c:3308
+ __dev_queue_xmit+0x271d/0x3060 net/core/dev.c:3878
+ dev_queue_xmit+0x18/0x20 net/core/dev.c:3911
+ neigh_direct_output+0x16/0x20 net/core/neighbour.c:1527
+ neigh_output include/net/neighbour.h:508 [inline]
+ ip_finish_output2+0x949/0x1740 net/ipv4/ip_output.c:229
+ ip_finish_output+0x73c/0xd50 net/ipv4/ip_output.c:317
+ NF_HOOK_COND include/linux/netfilter.h:278 [inline]
+ ip_output+0x21f/0x670 net/ipv4/ip_output.c:405
+ dst_output include/net/dst.h:444 [inline]
+ NF_HOOK include/linux/netfilter.h:289 [inline]
+ raw_send_hdrinc net/ipv4/raw.c:432 [inline]
+ raw_sendmsg+0x1d2b/0x2f20 net/ipv4/raw.c:663
+ inet_sendmsg+0x147/0x5d0 net/ipv4/af_inet.c:798
+ sock_sendmsg_nosec net/socket.c:651 [inline]
+ sock_sendmsg+0xdd/0x130 net/socket.c:661
+ sock_write_iter+0x27c/0x3e0 net/socket.c:988
+ call_write_iter include/linux/fs.h:1866 [inline]
+ new_sync_write+0x4c7/0x760 fs/read_write.c:474
+ __vfs_write+0xe4/0x110 fs/read_write.c:487
+ vfs_write+0x20c/0x580 fs/read_write.c:549
+ ksys_write+0x14f/0x2d0 fs/read_write.c:599
+ __do_sys_write fs/read_write.c:611 [inline]
+ __se_sys_write fs/read_write.c:608 [inline]
+ __x64_sys_write+0x73/0xb0 fs/read_write.c:608
+ do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
+ entry_SYSCALL_64_after_hwframe+0x49/0xbe
+RIP: 0033:0x458c29
+Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
+RSP: 002b:00007f293b44bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
+RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458c29
+RDX: 0000000000000014 RSI: 00000000200002c0 RDI: 0000000000000003
+RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
+R10: 0000000000000000 R11: 0000000000000246 R12: 00007f293b44c6d4
+R13: 00000000004c8623 R14: 00000000004ded68 R15: 00000000ffffffff
+
+The buggy address belongs to the page:
+page:ffffea00025aafc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
+flags: 0x1fffc0000000000()
+raw: 01fffc0000000000 0000000000000000 ffffffff025a0101 0000000000000000
+raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
+page dumped because: kasan: bad access detected
+
+Memory state around the buggy address:
+ ffff888096abef80: 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 f2
+ ffff888096abf000: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00
+>ffff888096abf080: 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
+                         ^
+ ffff888096abf100: 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3 00 00 00 00
+ ffff888096abf180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+Fixes: ed0de45a1008 ("ipv4: recompile ip options in ipv4_link_failure")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Stephen Suryaputra <ssuryaextr@gmail.com>
+Acked-by: Willem de Bruijn <willemb@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/route.c |   34 ++++++++++++++++++++++++----------
+ 1 file changed, 24 insertions(+), 10 deletions(-)
+
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -1168,25 +1168,39 @@ static struct dst_entry *ipv4_dst_check(
+       return dst;
+ }
+-static void ipv4_link_failure(struct sk_buff *skb)
++static void ipv4_send_dest_unreach(struct sk_buff *skb)
+ {
+       struct ip_options opt;
+-      struct rtable *rt;
+       int res;
+       /* Recompile ip options since IPCB may not be valid anymore.
++       * Also check we have a reasonable ipv4 header.
+        */
+-      memset(&opt, 0, sizeof(opt));
+-      opt.optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr);
+-
+-      rcu_read_lock();
+-      res = __ip_options_compile(dev_net(skb->dev), &opt, skb, NULL);
+-      rcu_read_unlock();
+-
+-      if (res)
++      if (!pskb_network_may_pull(skb, sizeof(struct iphdr)) ||
++          ip_hdr(skb)->version != 4 || ip_hdr(skb)->ihl < 5)
+               return;
++      memset(&opt, 0, sizeof(opt));
++      if (ip_hdr(skb)->ihl > 5) {
++              if (!pskb_network_may_pull(skb, ip_hdr(skb)->ihl * 4))
++                      return;
++              opt.optlen = ip_hdr(skb)->ihl * 4 - sizeof(struct iphdr);
++
++              rcu_read_lock();
++              res = __ip_options_compile(dev_net(skb->dev), &opt, skb, NULL);
++              rcu_read_unlock();
++
++              if (res)
++                      return;
++      }
+       __icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, &opt);
++}
++
++static void ipv4_link_failure(struct sk_buff *skb)
++{
++      struct rtable *rt;
++
++      ipv4_send_dest_unreach(skb);
+       rt = skb_rtable(skb);
+       if (rt)
diff --git a/queue-4.9/ipv4-set-the-tcp_min_rtt_wlen-range-from-0-to-one-day.patch b/queue-4.9/ipv4-set-the-tcp_min_rtt_wlen-range-from-0-to-one-day.patch
new file mode 100644 (file)
index 0000000..be9c3f0
--- /dev/null
@@ -0,0 +1,90 @@
+From foo@baz Tue 30 Apr 2019 11:23:34 AM CEST
+From: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
+Date: Tue, 16 Apr 2019 09:47:24 +0800
+Subject: ipv4: set the tcp_min_rtt_wlen range from 0 to one day
+
+From: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
+
+[ Upstream commit 19fad20d15a6494f47f85d869f00b11343ee5c78 ]
+
+There is a UBSAN report as below:
+UBSAN: Undefined behaviour in net/ipv4/tcp_input.c:2877:56
+signed integer overflow:
+2147483647 * 1000 cannot be represented in type 'int'
+CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.1.0-rc4-00058-g582549e #1
+Call Trace:
+ <IRQ>
+ dump_stack+0x8c/0xba
+ ubsan_epilogue+0x11/0x60
+ handle_overflow+0x12d/0x170
+ ? ttwu_do_wakeup+0x21/0x320
+ __ubsan_handle_mul_overflow+0x12/0x20
+ tcp_ack_update_rtt+0x76c/0x780
+ tcp_clean_rtx_queue+0x499/0x14d0
+ tcp_ack+0x69e/0x1240
+ ? __wake_up_sync_key+0x2c/0x50
+ ? update_group_capacity+0x50/0x680
+ tcp_rcv_established+0x4e2/0xe10
+ tcp_v4_do_rcv+0x22b/0x420
+ tcp_v4_rcv+0xfe8/0x1190
+ ip_protocol_deliver_rcu+0x36/0x180
+ ip_local_deliver+0x15b/0x1a0
+ ip_rcv+0xac/0xd0
+ __netif_receive_skb_one_core+0x7f/0xb0
+ __netif_receive_skb+0x33/0xc0
+ netif_receive_skb_internal+0x84/0x1c0
+ napi_gro_receive+0x2a0/0x300
+ receive_buf+0x3d4/0x2350
+ ? detach_buf_split+0x159/0x390
+ virtnet_poll+0x198/0x840
+ ? reweight_entity+0x243/0x4b0
+ net_rx_action+0x25c/0x770
+ __do_softirq+0x19b/0x66d
+ irq_exit+0x1eb/0x230
+ do_IRQ+0x7a/0x150
+ common_interrupt+0xf/0xf
+ </IRQ>
+
+It can be reproduced by:
+  echo 2147483647 > /proc/sys/net/ipv4/tcp_min_rtt_wlen
+
+Fixes: f672258391b42 ("tcp: track min RTT using windowed min-filter")
+Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/networking/ip-sysctl.txt |    1 +
+ net/ipv4/sysctl_net_ipv4.c             |    5 ++++-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+--- a/Documentation/networking/ip-sysctl.txt
++++ b/Documentation/networking/ip-sysctl.txt
+@@ -405,6 +405,7 @@ tcp_min_rtt_wlen - INTEGER
+       minimum RTT when it is moved to a longer path (e.g., due to traffic
+       engineering). A longer window makes the filter more resistant to RTT
+       inflations such as transient congestion. The unit is seconds.
++      Possible values: 0 - 86400 (1 day)
+       Default: 300
+ tcp_moderate_rcvbuf - BOOLEAN
+--- a/net/ipv4/sysctl_net_ipv4.c
++++ b/net/ipv4/sysctl_net_ipv4.c
+@@ -41,6 +41,7 @@ static int tcp_syn_retries_min = 1;
+ static int tcp_syn_retries_max = MAX_TCP_SYNCNT;
+ static int ip_ping_group_range_min[] = { 0, 0 };
+ static int ip_ping_group_range_max[] = { GID_T_MAX, GID_T_MAX };
++static int one_day_secs = 24 * 3600;
+ /* Update system visible IP port range */
+ static void set_local_port_range(struct net *net, int range[2])
+@@ -460,7 +461,9 @@ static struct ctl_table ipv4_table[] = {
+               .data           = &sysctl_tcp_min_rtt_wlen,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+-              .proc_handler   = proc_dointvec
++              .proc_handler   = proc_dointvec_minmax,
++              .extra1         = &zero,
++              .extra2         = &one_day_secs
+       },
+       {
+               .procname       = "tcp_low_latency",
diff --git a/queue-4.9/mlxsw-spectrum-fix-autoneg-status-in-ethtool.patch b/queue-4.9/mlxsw-spectrum-fix-autoneg-status-in-ethtool.patch
new file mode 100644 (file)
index 0000000..30f8589
--- /dev/null
@@ -0,0 +1,44 @@
+From foo@baz Tue 30 Apr 2019 11:31:40 AM CEST
+From: Amit Cohen <amitc@mellanox.com>
+Date: Thu, 18 Apr 2019 07:14:16 +0000
+Subject: mlxsw: spectrum: Fix autoneg status in ethtool
+
+From: Amit Cohen <amitc@mellanox.com>
+
+[ Upstream commit 151f0dddbbfe4c35c9c5b64873115aafd436af9d ]
+
+If link is down and autoneg is set to on/off, the status in ethtool does
+not change.
+
+The reason is when the link is down the function returns with zero
+before changing autoneg value.
+
+Move the checking of link state (up/down) to be performed after setting
+autoneg value, in order to be sure that autoneg will change in any case.
+
+Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
+Signed-off-by: Amit Cohen <amitc@mellanox.com>
+Signed-off-by: Ido Schimmel <idosch@mellanox.com>
+Acked-by: Jiri Pirko <jiri@mellanox.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlxsw/spectrum.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+@@ -2059,11 +2059,11 @@ mlxsw_sp_port_set_link_ksettings(struct
+       if (err)
+               return err;
++      mlxsw_sp_port->link.autoneg = autoneg;
++
+       if (!netif_running(dev))
+               return 0;
+-      mlxsw_sp_port->link.autoneg = autoneg;
+-
+       mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false);
+       mlxsw_sp_port_admin_status_set(mlxsw_sp_port, true);
diff --git a/queue-4.9/net-mlx5e-ethtool-remove-unsupported-sfp-eeprom-high-pages-query.patch b/queue-4.9/net-mlx5e-ethtool-remove-unsupported-sfp-eeprom-high-pages-query.patch
new file mode 100644 (file)
index 0000000..1d78648
--- /dev/null
@@ -0,0 +1,49 @@
+From foo@baz Tue 30 Apr 2019 11:31:40 AM CEST
+From: Erez Alfasi <ereza@mellanox.com>
+Date: Thu, 11 Apr 2019 10:41:03 +0300
+Subject: net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
+
+From: Erez Alfasi <ereza@mellanox.com>
+
+[ Upstream commit ace329f4ab3ba434be2adf618073c752d083b524 ]
+
+Querying EEPROM high pages data for SFP module is currently
+not supported by our driver and yet queried, resulting in
+invalid FW queries.
+
+Set the EEPROM ethtool data length to 256 for SFP module will
+limit the reading for page 0 only and prevent invalid FW queries.
+
+Fixes: bb64143eee8c ("net/mlx5e: Add ethtool support for dump module EEPROM")
+Signed-off-by: Erez Alfasi <ereza@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c |    2 +-
+ drivers/net/ethernet/mellanox/mlx5/core/port.c       |    4 ----
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+@@ -1365,7 +1365,7 @@ static int mlx5e_get_module_info(struct
+               break;
+       case MLX5_MODULE_ID_SFP:
+               modinfo->type       = ETH_MODULE_SFF_8472;
+-              modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
++              modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH;
+               break;
+       default:
+               netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",
+--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
+@@ -368,10 +368,6 @@ int mlx5_query_module_eeprom(struct mlx5
+               size -= offset + size - MLX5_EEPROM_PAGE_LENGTH;
+       i2c_addr = MLX5_I2C_ADDR_LOW;
+-      if (offset >= MLX5_EEPROM_PAGE_LENGTH) {
+-              i2c_addr = MLX5_I2C_ADDR_HIGH;
+-              offset -= MLX5_EEPROM_PAGE_LENGTH;
+-      }
+       MLX5_SET(mcia_reg, in, l, 0);
+       MLX5_SET(mcia_reg, in, module, module_num);
diff --git a/queue-4.9/net-rds-exchange-of-8k-and-1m-pool.patch b/queue-4.9/net-rds-exchange-of-8k-and-1m-pool.patch
new file mode 100644 (file)
index 0000000..03a7ad4
--- /dev/null
@@ -0,0 +1,80 @@
+From foo@baz Tue 30 Apr 2019 11:31:40 AM CEST
+From: Zhu Yanjun <yanjun.zhu@oracle.com>
+Date: Wed, 24 Apr 2019 02:56:42 -0400
+Subject: net: rds: exchange of 8K and 1M pool
+
+From: Zhu Yanjun <yanjun.zhu@oracle.com>
+
+[ Upstream commit 4b9fc7146249a6e0e3175d0acc033fdcd2bfcb17 ]
+
+Before the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"),
+when the dirty_count is greater than 9/10 of max_items of 8K pool,
+1M pool is used, Vice versa. After the commit 490ea5967b0d ("RDS: IB: move
+FMR code to its own file"), the above is removed. When we make the
+following tests.
+
+Server:
+  rds-stress -r 1.1.1.16 -D 1M
+
+Client:
+  rds-stress -r 1.1.1.14 -s 1.1.1.16 -D 1M
+
+The following will appear.
+"
+connecting to 1.1.1.16:4000
+negotiated options, tasks will start in 2 seconds
+Starting up..header from 1.1.1.166:4001 to id 4001 bogus
+..
+tsks  tx/s  rx/s tx+rx K/s  mbi K/s  mbo K/s tx us/c  rtt us
+cpu %
+   1    0    0     0.00     0.00     0.00    0.00 0.00 -1.00
+   1    0    0     0.00     0.00     0.00    0.00 0.00 -1.00
+   1    0    0     0.00     0.00     0.00    0.00 0.00 -1.00
+   1    0    0     0.00     0.00     0.00    0.00 0.00 -1.00
+   1    0    0     0.00     0.00     0.00    0.00 0.00 -1.00
+...
+"
+So this exchange between 8K and 1M pool is added back.
+
+Fixes: commit 490ea5967b0d ("RDS: IB: move FMR code to its own file")
+Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
+Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/rds/ib_fmr.c  |   11 +++++++++++
+ net/rds/ib_rdma.c |    3 ---
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+--- a/net/rds/ib_fmr.c
++++ b/net/rds/ib_fmr.c
+@@ -44,6 +44,17 @@ struct rds_ib_mr *rds_ib_alloc_fmr(struc
+       else
+               pool = rds_ibdev->mr_1m_pool;
++      if (atomic_read(&pool->dirty_count) >= pool->max_items / 10)
++              queue_delayed_work(rds_ib_mr_wq, &pool->flush_worker, 10);
++
++      /* Switch pools if one of the pool is reaching upper limit */
++      if (atomic_read(&pool->dirty_count) >=  pool->max_items * 9 / 10) {
++              if (pool->pool_type == RDS_IB_MR_8K_POOL)
++                      pool = rds_ibdev->mr_1m_pool;
++              else
++                      pool = rds_ibdev->mr_8k_pool;
++      }
++
+       ibmr = rds_ib_try_reuse_ibmr(pool);
+       if (ibmr)
+               return ibmr;
+--- a/net/rds/ib_rdma.c
++++ b/net/rds/ib_rdma.c
+@@ -442,9 +442,6 @@ struct rds_ib_mr *rds_ib_try_reuse_ibmr(
+       struct rds_ib_mr *ibmr = NULL;
+       int iter = 0;
+-      if (atomic_read(&pool->dirty_count) >= pool->max_items_soft / 10)
+-              queue_delayed_work(rds_ib_mr_wq, &pool->flush_worker, 10);
+-
+       while (1) {
+               ibmr = rds_ib_reuse_mr(pool);
+               if (ibmr)
diff --git a/queue-4.9/net-stmmac-move-stmmac_check_ether_addr-to-driver-probe.patch b/queue-4.9/net-stmmac-move-stmmac_check_ether_addr-to-driver-probe.patch
new file mode 100644 (file)
index 0000000..7dff9a6
--- /dev/null
@@ -0,0 +1,46 @@
+From foo@baz Tue 30 Apr 2019 11:31:40 AM CEST
+From: Vinod Koul <vkoul@kernel.org>
+Date: Mon, 22 Apr 2019 15:15:32 +0530
+Subject: net: stmmac: move stmmac_check_ether_addr() to driver probe
+
+From: Vinod Koul <vkoul@kernel.org>
+
+[ Upstream commit b561af36b1841088552464cdc3f6371d92f17710 ]
+
+stmmac_check_ether_addr() checks the MAC address and assigns one in
+driver open(). In many cases when we create slave netdevice, the dev
+addr is inherited from master but the master dev addr maybe NULL at
+that time, so move this call to driver probe so that address is
+always valid.
+
+Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
+Tested-by: Xiaofei Shen <xiaofeis@codeaurora.org>
+Signed-off-by: Sneh Shah <snehshah@codeaurora.org>
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+@@ -1796,8 +1796,6 @@ static int stmmac_open(struct net_device
+       struct stmmac_priv *priv = netdev_priv(dev);
+       int ret;
+-      stmmac_check_ether_addr(priv);
+-
+       if (priv->hw->pcs != STMMAC_PCS_RGMII &&
+           priv->hw->pcs != STMMAC_PCS_TBI &&
+           priv->hw->pcs != STMMAC_PCS_RTBI) {
+@@ -3355,6 +3353,8 @@ int stmmac_dvr_probe(struct device *devi
+       if (ret)
+               goto error_hw_init;
++      stmmac_check_ether_addr(priv);
++
+       ndev->netdev_ops = &stmmac_netdev_ops;
+       ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
index 2b44e71b72f71c312bf80a9104f1665b57017ff0..43c3b76ebe4919f45a3c5501ba86505d3915a477 100644 (file)
@@ -27,3 +27,10 @@ fm10k-fix-a-potential-null-pointer-dereference.patch
 tipc-check-bearer-name-with-right-length-in-tipc_nl_compat_bearer_enable.patch
 tipc-check-link-name-with-right-length-in-tipc_nl_compat_link_set.patch
 revert-block-loop-use-global-lock-for-ioctl-operation.patch
+ipv4-add-sanity-checks-in-ipv4_link_failure.patch
+mlxsw-spectrum-fix-autoneg-status-in-ethtool.patch
+net-mlx5e-ethtool-remove-unsupported-sfp-eeprom-high-pages-query.patch
+net-rds-exchange-of-8k-and-1m-pool.patch
+team-fix-possible-recursive-locking-when-add-slaves.patch
+net-stmmac-move-stmmac_check_ether_addr-to-driver-probe.patch
+ipv4-set-the-tcp_min_rtt_wlen-range-from-0-to-one-day.patch
diff --git a/queue-4.9/team-fix-possible-recursive-locking-when-add-slaves.patch b/queue-4.9/team-fix-possible-recursive-locking-when-add-slaves.patch
new file mode 100644 (file)
index 0000000..8cfc9c1
--- /dev/null
@@ -0,0 +1,52 @@
+From foo@baz Tue 30 Apr 2019 11:31:40 AM CEST
+From: Hangbin Liu <liuhangbin@gmail.com>
+Date: Fri, 19 Apr 2019 14:31:00 +0800
+Subject: team: fix possible recursive locking when add slaves
+
+From: Hangbin Liu <liuhangbin@gmail.com>
+
+[ Upstream commit 925b0c841e066b488cc3a60272472b2c56300704 ]
+
+If we add a bond device which is already the master of the team interface,
+we will hold the team->lock in team_add_slave() first and then request the
+lock in team_set_mac_address() again. The functions are called like:
+
+- team_add_slave()
+ - team_port_add()
+   - team_port_enter()
+     - team_modeop_port_enter()
+       - __set_port_dev_addr()
+         - dev_set_mac_address()
+           - bond_set_mac_address()
+             - dev_set_mac_address()
+              - team_set_mac_address
+
+Although team_upper_dev_link() would check the upper devices but it is
+called too late. Fix it by adding a checking before processing the slave.
+
+v2: Do not split the string in netdev_err()
+
+Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
+Acked-by: Jiri Pirko <jiri@mellanox.com>
+Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/team/team.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/net/team/team.c
++++ b/drivers/net/team/team.c
+@@ -1163,6 +1163,12 @@ static int team_port_add(struct team *te
+               return -EINVAL;
+       }
++      if (netdev_has_upper_dev(dev, port_dev)) {
++              netdev_err(dev, "Device %s is already an upper device of the team interface\n",
++                         portname);
++              return -EBUSY;
++      }
++
+       if (port_dev->features & NETIF_F_VLAN_CHALLENGED &&
+           vlan_uses_dev(dev)) {
+               netdev_err(dev, "Device %s is VLAN challenged and team device has VLAN set up\n",