]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Aug 2022 13:04:59 +0000 (15:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Aug 2022 13:04:59 +0000 (15:04 +0200)
added patches:
fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch
netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch

queue-4.9/fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch [new file with mode: 0644]
queue-4.9/netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch b/queue-4.9/fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch
new file mode 100644 (file)
index 0000000..4e3918f
--- /dev/null
@@ -0,0 +1,39 @@
+From 61d5e2a251fb20c2c5e998c3f1d52ed6d5360319 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cs=C3=B3k=C3=A1s=20Bence?= <csokas.bence@prolan.hu>
+Date: Thu, 11 Aug 2022 12:13:49 +0200
+Subject: fec: Fix timer capture timing in `fec_ptp_enable_pps()`
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Csókás Bence <csokas.bence@prolan.hu>
+
+commit 61d5e2a251fb20c2c5e998c3f1d52ed6d5360319 upstream.
+
+Code reimplements functionality already in `fec_ptp_read()`,
+but misses check for FEC_QUIRK_BUG_CAPTURE. Replace with function call.
+
+Fixes: 28b5f058cf1d ("net: fec: ptp: fix convergence issue to support LinuxPTP stack")
+Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
+Link: https://lore.kernel.org/r/20220811101348.13755-1-csokas.bence@prolan.hu
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/freescale/fec_ptp.c |    6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/fec_ptp.c
++++ b/drivers/net/ethernet/freescale/fec_ptp.c
+@@ -155,11 +155,7 @@ static int fec_ptp_enable_pps(struct fec
+                * NSEC_PER_SEC - ts.tv_nsec. Add the remaining nanoseconds
+                * to current timer would be next second.
+                */
+-              tempval = readl(fep->hwp + FEC_ATIME_CTRL);
+-              tempval |= FEC_T_CTRL_CAPTURE;
+-              writel(tempval, fep->hwp + FEC_ATIME_CTRL);
+-
+-              tempval = readl(fep->hwp + FEC_ATIME);
++              tempval = fep->cc.read(&fep->cc);
+               /* Convert the ptp local counter to 1588 timestamp */
+               ns = timecounter_cyc2time(&fep->tc, tempval);
+               ts = ns_to_timespec64(ns);
diff --git a/queue-4.9/netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch b/queue-4.9/netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch
new file mode 100644 (file)
index 0000000..2b97786
--- /dev/null
@@ -0,0 +1,30 @@
+From 271c5ca826e0c3c53e0eb4032f8eaedea1ee391c Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Tue, 9 Aug 2022 17:23:53 +0200
+Subject: netfilter: nf_tables: really skip inactive sets when allocating name
+
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+
+commit 271c5ca826e0c3c53e0eb4032f8eaedea1ee391c upstream.
+
+While looping to build the bitmap of used anonymous set names, check the
+current set in the iteration, instead of the one that is being created.
+
+Fixes: 37a9cc525525 ("netfilter: nf_tables: add generation mask to sets")
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/netfilter/nf_tables_api.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/netfilter/nf_tables_api.c
++++ b/net/netfilter/nf_tables_api.c
+@@ -2515,7 +2515,7 @@ cont:
+               list_for_each_entry(i, &ctx->table->sets, list) {
+                       int tmp;
+-                      if (!nft_is_active_next(ctx->net, set))
++                      if (!nft_is_active_next(ctx->net, i))
+                               continue;
+                       if (!sscanf(i->name, name, &tmp))
+                               continue;
index 4036d6d34de7b97946b5750817fb40efdd22504a..9c3b58513a5c059cf858602676a3cae1a4844d45 100644 (file)
@@ -81,3 +81,5 @@ nios2-traced-syscall-does-need-to-check-the-syscall-number.patch
 nios2-fix-syscall-restart-checks.patch
 nios2-restarts-apply-only-to-the-first-sigframe-we-build.patch
 nios2-add-force_successful_syscall_return.patch
+netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch
+fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch