From: Sasha Levin Date: Sun, 24 Oct 2021 01:28:47 +0000 (-0400) Subject: Fixes for 4.9 X-Git-Tag: v4.4.290~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05360bacb1314d775ce24dcb22587fd5ce798ccd;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.9 Signed-off-by: Sasha Levin --- diff --git a/queue-4.9/netfilter-ipvs-make-global-sysctl-readonly-in-non-in.patch b/queue-4.9/netfilter-ipvs-make-global-sysctl-readonly-in-non-in.patch new file mode 100644 index 00000000000..276396294d8 --- /dev/null +++ b/queue-4.9/netfilter-ipvs-make-global-sysctl-readonly-in-non-in.patch @@ -0,0 +1,40 @@ +From d26666cb5dfe10edc3de39b503d2a180825c89f2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 12 Oct 2021 16:54:37 +0200 +Subject: netfilter: ipvs: make global sysctl readonly in non-init netns + +From: Antoine Tenart + +[ Upstream commit 174c376278949c44aad89c514a6b5db6cee8db59 ] + +Because the data pointer of net/ipv4/vs/debug_level is not updated per +netns, it must be marked as read-only in non-init netns. + +Fixes: c6d2d445d8de ("IPVS: netns, final patch enabling network name space.") +Signed-off-by: Antoine Tenart +Acked-by: Julian Anastasov +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Sasha Levin +--- + net/netfilter/ipvs/ip_vs_ctl.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c +index 4e08305a55c4..3ee198b3bfe2 100644 +--- a/net/netfilter/ipvs/ip_vs_ctl.c ++++ b/net/netfilter/ipvs/ip_vs_ctl.c +@@ -3987,6 +3987,11 @@ static int __net_init ip_vs_control_net_init_sysctl(struct netns_ipvs *ipvs) + tbl[idx++].data = &ipvs->sysctl_conn_reuse_mode; + tbl[idx++].data = &ipvs->sysctl_schedule_icmp; + tbl[idx++].data = &ipvs->sysctl_ignore_tunneled; ++#ifdef CONFIG_IP_VS_DEBUG ++ /* Global sysctls must be ro in non-init netns */ ++ if (!net_eq(net, &init_net)) ++ tbl[idx++].mode = 0444; ++#endif + + ipvs->sysctl_hdr = register_net_sysctl(net, "net/ipv4/vs", tbl); + if (ipvs->sysctl_hdr == NULL) { +-- +2.33.0 + diff --git a/queue-4.9/nios2-irqflags-rename-a-redefined-register-name.patch b/queue-4.9/nios2-irqflags-rename-a-redefined-register-name.patch new file mode 100644 index 00000000000..46bc5edd455 --- /dev/null +++ b/queue-4.9/nios2-irqflags-rename-a-redefined-register-name.patch @@ -0,0 +1,67 @@ +From 46a579fe7c22f2138ca2b408e42244c442f6c801 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 4 Oct 2021 00:56:06 -0700 +Subject: NIOS2: irqflags: rename a redefined register name + +From: Randy Dunlap + +[ Upstream commit 4cce60f15c04d69eff6ffc539ab09137dbe15070 ] + +Both arch/nios2/ and drivers/mmc/host/tmio_mmc.c define a macro +with the name "CTL_STATUS". Change the one in arch/nios2/ to be +"CTL_FSTATUS" (flags status) to eliminate the build warning. + +In file included from ../drivers/mmc/host/tmio_mmc.c:22: +drivers/mmc/host/tmio_mmc.h:31: warning: "CTL_STATUS" redefined + 31 | #define CTL_STATUS 0x1c +arch/nios2/include/asm/registers.h:14: note: this is the location of the previous definition + 14 | #define CTL_STATUS 0 + +Fixes: b31ebd8055ea ("nios2: Nios2 registers") +Signed-off-by: Randy Dunlap +Cc: Dinh Nguyen +Signed-off-by: Dinh Nguyen +Signed-off-by: Sasha Levin +--- + arch/nios2/include/asm/irqflags.h | 4 ++-- + arch/nios2/include/asm/registers.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/nios2/include/asm/irqflags.h b/arch/nios2/include/asm/irqflags.h +index 75ab92e639f8..0338fcb88203 100644 +--- a/arch/nios2/include/asm/irqflags.h ++++ b/arch/nios2/include/asm/irqflags.h +@@ -22,7 +22,7 @@ + + static inline unsigned long arch_local_save_flags(void) + { +- return RDCTL(CTL_STATUS); ++ return RDCTL(CTL_FSTATUS); + } + + /* +@@ -31,7 +31,7 @@ static inline unsigned long arch_local_save_flags(void) + */ + static inline void arch_local_irq_restore(unsigned long flags) + { +- WRCTL(CTL_STATUS, flags); ++ WRCTL(CTL_FSTATUS, flags); + } + + static inline void arch_local_irq_disable(void) +diff --git a/arch/nios2/include/asm/registers.h b/arch/nios2/include/asm/registers.h +index 615bce19b546..33824f2ad1ab 100644 +--- a/arch/nios2/include/asm/registers.h ++++ b/arch/nios2/include/asm/registers.h +@@ -24,7 +24,7 @@ + #endif + + /* control register numbers */ +-#define CTL_STATUS 0 ++#define CTL_FSTATUS 0 + #define CTL_ESTATUS 1 + #define CTL_BSTATUS 2 + #define CTL_IENABLE 3 +-- +2.33.0 + diff --git a/queue-4.9/series b/queue-4.9/series index c80d7d67689..c954e759ba7 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -26,3 +26,5 @@ r8152-select-crc32-and-crypto-crypto_hash-crypto_sha256.patch xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch xtensa-xtfpga-try-software-restart-before-simulating.patch nfsd-keep-existing-listeners-on-portlist-error.patch +netfilter-ipvs-make-global-sysctl-readonly-in-non-in.patch +nios2-irqflags-rename-a-redefined-register-name.patch