From: Greg Kroah-Hartman Date: Mon, 22 Aug 2022 13:04:59 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.9.326~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49ddf1e8c7b5f061bde410be65480d52fc5fc2cc;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch --- 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 index 00000000000..4e3918ff0e6 --- /dev/null +++ b/queue-4.9/fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch @@ -0,0 +1,39 @@ +From 61d5e2a251fb20c2c5e998c3f1d52ed6d5360319 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cs=C3=B3k=C3=A1s=20Bence?= +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 + +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 +Link: https://lore.kernel.org/r/20220811101348.13755-1-csokas.bence@prolan.hu +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..2b977862022 --- /dev/null +++ b/queue-4.9/netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch @@ -0,0 +1,30 @@ +From 271c5ca826e0c3c53e0eb4032f8eaedea1ee391c Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Tue, 9 Aug 2022 17:23:53 +0200 +Subject: netfilter: nf_tables: really skip inactive sets when allocating name + +From: Pablo Neira Ayuso + +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 +Signed-off-by: Greg Kroah-Hartman +--- + 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; diff --git a/queue-4.9/series b/queue-4.9/series index 4036d6d34de..9c3b58513a5 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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