]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2024 10:57:58 +0000 (12:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2024 10:57:58 +0000 (12:57 +0200)
added patches:
revert-fork-defer-linking-file-vma-until-vma-is-fully-initialized.patch

queue-6.1/netfilter-use-flowlabel-flow-key-when-re-routing-man.patch [deleted file]
queue-6.1/revert-fork-defer-linking-file-vma-until-vma-is-fully-initialized.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/netfilter-use-flowlabel-flow-key-when-re-routing-man.patch b/queue-6.1/netfilter-use-flowlabel-flow-key-when-re-routing-man.patch
deleted file mode 100644 (file)
index 39a84b7..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From e363822882ca60f0ded2432ba6f5feca284f5d0a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 6 Jun 2024 12:23:31 +0200
-Subject: netfilter: Use flowlabel flow key when re-routing mangled packets
-
-From: Florian Westphal <fw@strlen.de>
-
-[ Upstream commit 6f8f132cc7bac2ac76911e47d5baa378aafda4cb ]
-
-'ip6 dscp set $v' in an nftables outpute route chain has no effect.
-While nftables does detect the dscp change and calls the reroute hook.
-But ip6_route_me_harder never sets the dscp/flowlabel:
-flowlabel/dsfield routing rules are ignored and no reroute takes place.
-
-Thanks to Yi Chen for an excellent reproducer script that I used
-to validate this change.
-
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reported-by: Yi Chen <yiche@redhat.com>
-Signed-off-by: Florian Westphal <fw@strlen.de>
-Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/ipv6/netfilter.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
-index 857713d7a38a5..1df23cd31b767 100644
---- a/net/ipv6/netfilter.c
-+++ b/net/ipv6/netfilter.c
-@@ -36,6 +36,7 @@ int ip6_route_me_harder(struct net *net, struct sock *sk_partial, struct sk_buff
-               .flowi6_uid = sock_net_uid(net, sk),
-               .daddr = iph->daddr,
-               .saddr = iph->saddr,
-+              .flowlabel = ip6_flowinfo(iph),
-       };
-       int err;
--- 
-2.43.0
-
diff --git a/queue-6.1/revert-fork-defer-linking-file-vma-until-vma-is-fully-initialized.patch b/queue-6.1/revert-fork-defer-linking-file-vma-until-vma-is-fully-initialized.patch
new file mode 100644 (file)
index 0000000..34a165b
--- /dev/null
@@ -0,0 +1,66 @@
+From sam@gentoo.org  Wed Jun 19 12:52:49 2024
+From: Sam James <sam@gentoo.org>
+Date: Fri, 14 Jun 2024 09:40:28 +0100
+Subject: Revert "fork: defer linking file vma until vma is fully initialized"
+To: stable@vger.kernel.org
+Cc: Greg KH <gregkh@linuxfoundation.org>, leah.rumancik@gmail.com, Miaohe Lin <linmiaohe@huawei.com>, Sam James <sam@gentoo.org>
+Message-ID: <20240614084038.3133260-1-sam@gentoo.org>
+
+From: Sam James <sam@gentoo.org>
+
+This reverts commit 0c42f7e039aba3de6d7dbf92da708e2b2ecba557 which is commit
+35e351780fa9d8240dd6f7e4f245f9ea37e96c19 upstream.
+
+The backport is incomplete and causes xfstests failures. The consequences
+of the incomplete backport seem worse than the original issue, so pick
+the lesser evil and revert until a full backport is ready.
+
+Link: https://lore.kernel.org/stable/20240604004751.3883227-1-leah.rumancik@gmail.com/
+Reported-by: Leah Rumancik <leah.rumancik@gmail.com>
+Signed-off-by: Sam James <sam@gentoo.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/fork.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -662,15 +662,6 @@ static __latent_entropy int dup_mmap(str
+               } else if (anon_vma_fork(tmp, mpnt))
+                       goto fail_nomem_anon_vma_fork;
+               tmp->vm_flags &= ~(VM_LOCKED | VM_LOCKONFAULT);
+-              /*
+-               * Copy/update hugetlb private vma information.
+-               */
+-              if (is_vm_hugetlb_page(tmp))
+-                      hugetlb_dup_vma_private(tmp);
+-
+-              if (tmp->vm_ops && tmp->vm_ops->open)
+-                      tmp->vm_ops->open(tmp);
+-
+               file = tmp->vm_file;
+               if (file) {
+                       struct address_space *mapping = file->f_mapping;
+@@ -687,6 +678,12 @@ static __latent_entropy int dup_mmap(str
+                       i_mmap_unlock_write(mapping);
+               }
++              /*
++               * Copy/update hugetlb private vma information.
++               */
++              if (is_vm_hugetlb_page(tmp))
++                      hugetlb_dup_vma_private(tmp);
++
+               /* Link the vma into the MT */
+               mas.index = tmp->vm_start;
+               mas.last = tmp->vm_end - 1;
+@@ -698,6 +695,9 @@ static __latent_entropy int dup_mmap(str
+               if (!(tmp->vm_flags & VM_WIPEONFORK))
+                       retval = copy_page_range(tmp, mpnt);
++              if (tmp->vm_ops && tmp->vm_ops->open)
++                      tmp->vm_ops->open(tmp);
++
+               if (retval)
+                       goto loop_out;
+       }
index e4aa0afd6424b29288201c539a0c1b5660932d83..df974d641d7a6156cd1061c06b4cdee1a722f1a9 100644 (file)
@@ -149,7 +149,6 @@ geneve-fix-incorrect-inner-network-header-offset-whe.patch
 net-mlx5e-fix-features-validation-check-for-tunneled.patch
 bluetooth-l2cap-fix-rejecting-l2cap_conn_param_updat.patch
 netfilter-ipset-fix-race-between-namespace-cleanup-a.patch
-netfilter-use-flowlabel-flow-key-when-re-routing-man.patch
 net-pse-pd-use-eopnotsupp-error-code-instead-of-enot.patch
 gve-ignore-nonrelevant-gso-type-bits-when-processing.patch
 net-stmmac-replace-priv-speed-with-the-porttransmitr.patch
@@ -207,3 +206,4 @@ mm-huge_memory-don-t-unpoison-huge_zero_folio.patch
 mm-memory-failure-fix-handling-of-dissolved-but-not-taken-off-from-buddy-pages.patch
 serial-8250_pxa-configure-tx_loadsz-to-match-fifo-irq-level.patch
 mptcp-pm-update-add_addr-counters-after-connect.patch
+revert-fork-defer-linking-file-vma-until-vma-is-fully-initialized.patch