[pve-devel] [PATCH kernel 4.15 2/7] rebase patches

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Mar 21 11:27:28 CET 2018


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 ...overrides-for-missing-ACS-capabilities-4..patch |  6 +-
 ...sable-default-dynamic-halt-polling-growth.patch |  2 +-
 ...e-metadata-estimation-accurate-and-clear.patch} |  0
 ...tp-fix-dst-refcnt-leak-in-sctp_v4_get_dst.patch | 89 ----------------------
 ...-reuse-extent-block-in-dealloc-without-m.patch} |  0
 ...tp-fix-dst-refcnt-leak-in-sctp_v6_get_dst.patch | 60 ---------------
 6 files changed, 4 insertions(+), 153 deletions(-)
 rename patches/kernel/{0007-ocfs2-make-metadata-estimation-accurate-and-clear.patch => 0005-ocfs2-make-metadata-estimation-accurate-and-clear.patch} (100%)
 delete mode 100644 patches/kernel/0005-sctp-fix-dst-refcnt-leak-in-sctp_v4_get_dst.patch
 rename patches/kernel/{0008-ocfs2-try-to-reuse-extent-block-in-dealloc-without-m.patch => 0006-ocfs2-try-to-reuse-extent-block-in-dealloc-without-m.patch} (100%)
 delete mode 100644 patches/kernel/0006-sctp-fix-dst-refcnt-leak-in-sctp_v6_get_dst.patch

diff --git a/patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch b/patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch
index 969d5cb..c7fcb74 100644
--- a/patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch
+++ b/patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch
@@ -74,10 +74,10 @@ index 27ca3fbc47aa..5e3caff3fb49 100644
  				Safety option to keep boot IRQs enabled. This
  				should never be necessary.
 diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
-index db82bef43b99..ed94ba0d0922 100644
+index 242040c87ce2..3926d5bf4d06 100644
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -3695,6 +3695,106 @@ static int __init pci_apply_final_quirks(void)
+@@ -3702,6 +3702,106 @@ static int __init pci_apply_final_quirks(void)
  
  fs_initcall_sync(pci_apply_final_quirks);
  
@@ -184,7 +184,7 @@ index db82bef43b99..ed94ba0d0922 100644
  /*
   * Following are device-specific reset methods which can be used to
   * reset a single function if other methods (e.g. FLR, PM D0->D3) are
-@@ -4527,6 +4627,7 @@ static const struct pci_dev_acs_enabled {
+@@ -4534,6 +4634,7 @@ static const struct pci_dev_acs_enabled {
  	{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
  	/* APM X-Gene */
  	{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
diff --git a/patches/kernel/0004-kvm-disable-default-dynamic-halt-polling-growth.patch b/patches/kernel/0004-kvm-disable-default-dynamic-halt-polling-growth.patch
index aa5f518..adf9ef7 100644
--- a/patches/kernel/0004-kvm-disable-default-dynamic-halt-polling-growth.patch
+++ b/patches/kernel/0004-kvm-disable-default-dynamic-halt-polling-growth.patch
@@ -12,7 +12,7 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
-index 210bf820385a..5b7e582f3742 100644
+index e536977e7b6d..4c63296eb5a8 100644
 --- a/virt/kvm/kvm_main.c
 +++ b/virt/kvm/kvm_main.c
 @@ -77,7 +77,7 @@ module_param(halt_poll_ns, uint, 0644);
diff --git a/patches/kernel/0007-ocfs2-make-metadata-estimation-accurate-and-clear.patch b/patches/kernel/0005-ocfs2-make-metadata-estimation-accurate-and-clear.patch
similarity index 100%
rename from patches/kernel/0007-ocfs2-make-metadata-estimation-accurate-and-clear.patch
rename to patches/kernel/0005-ocfs2-make-metadata-estimation-accurate-and-clear.patch
diff --git a/patches/kernel/0005-sctp-fix-dst-refcnt-leak-in-sctp_v4_get_dst.patch b/patches/kernel/0005-sctp-fix-dst-refcnt-leak-in-sctp_v4_get_dst.patch
deleted file mode 100644
index d1a4cd6..0000000
--- a/patches/kernel/0005-sctp-fix-dst-refcnt-leak-in-sctp_v4_get_dst.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Tommi Rantala <tommi.t.rantala at nokia.com>
-Date: Mon, 5 Feb 2018 21:48:14 +0200
-Subject: [PATCH] sctp: fix dst refcnt leak in sctp_v4_get_dst
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fix dst reference count leak in sctp_v4_get_dst() introduced in commit
-410f03831 ("sctp: add routing output fallback"):
-
-When walking the address_list, successive ip_route_output_key() calls
-may return the same rt->dst with the reference incremented on each call.
-
-The code would not decrement the dst refcount when the dst pointer was
-identical from the previous iteration, causing the dst refcnt leak.
-
-Testcase:
-  ip netns add TEST
-  ip netns exec TEST ip link set lo up
-  ip link add dummy0 type dummy
-  ip link add dummy1 type dummy
-  ip link add dummy2 type dummy
-  ip link set dev dummy0 netns TEST
-  ip link set dev dummy1 netns TEST
-  ip link set dev dummy2 netns TEST
-  ip netns exec TEST ip addr add 192.168.1.1/24 dev dummy0
-  ip netns exec TEST ip link set dummy0 up
-  ip netns exec TEST ip addr add 192.168.1.2/24 dev dummy1
-  ip netns exec TEST ip link set dummy1 up
-  ip netns exec TEST ip addr add 192.168.1.3/24 dev dummy2
-  ip netns exec TEST ip link set dummy2 up
-  ip netns exec TEST sctp_test -H 192.168.1.2 -P 20002 -h 192.168.1.1 -p 20000 -s -B 192.168.1.3
-  ip netns del TEST
-
-In 4.4 and 4.9 kernels this results to:
-  [  354.179591] unregister_netdevice: waiting for lo to become free. Usage count = 1
-  [  364.419674] unregister_netdevice: waiting for lo to become free. Usage count = 1
-  [  374.663664] unregister_netdevice: waiting for lo to become free. Usage count = 1
-  [  384.903717] unregister_netdevice: waiting for lo to become free. Usage count = 1
-  [  395.143724] unregister_netdevice: waiting for lo to become free. Usage count = 1
-  [  405.383645] unregister_netdevice: waiting for lo to become free. Usage count = 1
-  ...
-
-Fixes: 410f03831 ("sctp: add routing output fallback")
-Fixes: 0ca50d12f ("sctp: fix src address selection if using secondary addresses")
-Signed-off-by: Tommi Rantala <tommi.t.rantala at nokia.com>
-Acked-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
-Acked-by: Neil Horman <nhorman at tuxdriver.com>
-Signed-off-by: David S. Miller <davem at davemloft.net>
-Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
----
- net/sctp/protocol.c | 10 ++++------
- 1 file changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
-index 6a38c2503649..91813e686c67 100644
---- a/net/sctp/protocol.c
-+++ b/net/sctp/protocol.c
-@@ -514,22 +514,20 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
- 		if (IS_ERR(rt))
- 			continue;
- 
--		if (!dst)
--			dst = &rt->dst;
--
- 		/* Ensure the src address belongs to the output
- 		 * interface.
- 		 */
- 		odev = __ip_dev_find(sock_net(sk), laddr->a.v4.sin_addr.s_addr,
- 				     false);
- 		if (!odev || odev->ifindex != fl4->flowi4_oif) {
--			if (&rt->dst != dst)
-+			if (!dst)
-+				dst = &rt->dst;
-+			else
- 				dst_release(&rt->dst);
- 			continue;
- 		}
- 
--		if (dst != &rt->dst)
--			dst_release(dst);
-+		dst_release(dst);
- 		dst = &rt->dst;
- 		break;
- 	}
--- 
-2.14.2
-
diff --git a/patches/kernel/0008-ocfs2-try-to-reuse-extent-block-in-dealloc-without-m.patch b/patches/kernel/0006-ocfs2-try-to-reuse-extent-block-in-dealloc-without-m.patch
similarity index 100%
rename from patches/kernel/0008-ocfs2-try-to-reuse-extent-block-in-dealloc-without-m.patch
rename to patches/kernel/0006-ocfs2-try-to-reuse-extent-block-in-dealloc-without-m.patch
diff --git a/patches/kernel/0006-sctp-fix-dst-refcnt-leak-in-sctp_v6_get_dst.patch b/patches/kernel/0006-sctp-fix-dst-refcnt-leak-in-sctp_v6_get_dst.patch
deleted file mode 100644
index ea351e7..0000000
--- a/patches/kernel/0006-sctp-fix-dst-refcnt-leak-in-sctp_v6_get_dst.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Alexey Kodanev <alexey.kodanev at oracle.com>
-Date: Mon, 5 Feb 2018 15:10:35 +0300
-Subject: [PATCH] sctp: fix dst refcnt leak in sctp_v6_get_dst()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When going through the bind address list in sctp_v6_get_dst() and
-the previously found address is better ('matchlen > bmatchlen'),
-the code continues to the next iteration without releasing currently
-held destination.
-
-Fix it by releasing 'bdst' before continue to the next iteration, and
-instead of introducing one more '!IS_ERR(bdst)' check for dst_release(),
-move the already existed one right after ip6_dst_lookup_flow(), i.e. we
-shouldn't proceed further if we get an error for the route lookup.
-
-Fixes: dbc2b5e9a09e ("sctp: fix src address selection if using secondary addresses for ipv6")
-Signed-off-by: Alexey Kodanev <alexey.kodanev at oracle.com>
-Acked-by: Neil Horman <nhorman at tuxdriver.com>
-Acked-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
-Signed-off-by: David S. Miller <davem at davemloft.net>
-Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
----
- net/sctp/ipv6.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
-index 5d4c15bf66d2..e35d4f73d2df 100644
---- a/net/sctp/ipv6.c
-+++ b/net/sctp/ipv6.c
-@@ -326,8 +326,10 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
- 		final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final);
- 		bdst = ip6_dst_lookup_flow(sk, fl6, final_p);
- 
--		if (!IS_ERR(bdst) &&
--		    ipv6_chk_addr(dev_net(bdst->dev),
-+		if (IS_ERR(bdst))
-+			continue;
-+
-+		if (ipv6_chk_addr(dev_net(bdst->dev),
- 				  &laddr->a.v6.sin6_addr, bdst->dev, 1)) {
- 			if (!IS_ERR_OR_NULL(dst))
- 				dst_release(dst);
-@@ -336,8 +338,10 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
- 		}
- 
- 		bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
--		if (matchlen > bmatchlen)
-+		if (matchlen > bmatchlen) {
-+			dst_release(bdst);
- 			continue;
-+		}
- 
- 		if (!IS_ERR_OR_NULL(dst))
- 			dst_release(dst);
--- 
-2.14.2
-
-- 
2.14.2





More information about the pve-devel mailing list