From: Greg Kroah-Hartman Date: Mon, 21 Jun 2021 14:03:55 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.4.128~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51f397dbe4a9913f4cfc9977d8ae93e323f88cac;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: net-fec_ptp-add-clock-rate-zero-check.patch net-stmmac-disable-clocks-in-stmmac_remove_config_dt.patch perf-beauty-update-copy-of-linux-socket.h-with-the-kernel-sources.patch tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch --- diff --git a/queue-5.10/net-fec_ptp-add-clock-rate-zero-check.patch b/queue-5.10/net-fec_ptp-add-clock-rate-zero-check.patch new file mode 100644 index 00000000000..656b9fd9e0a --- /dev/null +++ b/queue-5.10/net-fec_ptp-add-clock-rate-zero-check.patch @@ -0,0 +1,33 @@ +From cb3cefe3f3f8af27c6076ef7d1f00350f502055d Mon Sep 17 00:00:00 2001 +From: Fugang Duan +Date: Wed, 16 Jun 2021 17:14:25 +0800 +Subject: net: fec_ptp: add clock rate zero check + +From: Fugang Duan + +commit cb3cefe3f3f8af27c6076ef7d1f00350f502055d upstream. + +Add clock rate zero check to fix coverity issue of "divide by 0". + +Fixes: commit 85bd1798b24a ("net: fec: fix spin_lock dead lock") +Signed-off-by: Fugang Duan +Signed-off-by: Joakim Zhang +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/freescale/fec_ptp.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/ethernet/freescale/fec_ptp.c ++++ b/drivers/net/ethernet/freescale/fec_ptp.c +@@ -602,6 +602,10 @@ void fec_ptp_init(struct platform_device + fep->ptp_caps.enable = fec_ptp_enable; + + fep->cycle_speed = clk_get_rate(fep->clk_ptp); ++ if (!fep->cycle_speed) { ++ fep->cycle_speed = NSEC_PER_SEC; ++ dev_err(&fep->pdev->dev, "clk_ptp clock rate is zero\n"); ++ } + fep->ptp_inc = NSEC_PER_SEC / fep->cycle_speed; + + spin_lock_init(&fep->tmreg_lock); diff --git a/queue-5.10/net-stmmac-disable-clocks-in-stmmac_remove_config_dt.patch b/queue-5.10/net-stmmac-disable-clocks-in-stmmac_remove_config_dt.patch new file mode 100644 index 00000000000..70d245cfe79 --- /dev/null +++ b/queue-5.10/net-stmmac-disable-clocks-in-stmmac_remove_config_dt.patch @@ -0,0 +1,36 @@ +From 8f269102baf788aecfcbbc6313b6bceb54c9b990 Mon Sep 17 00:00:00 2001 +From: Joakim Zhang +Date: Wed, 16 Jun 2021 17:10:24 +0800 +Subject: net: stmmac: disable clocks in stmmac_remove_config_dt() + +From: Joakim Zhang + +commit 8f269102baf788aecfcbbc6313b6bceb54c9b990 upstream. + +Platform drivers may call stmmac_probe_config_dt() to parse dt, could +call stmmac_remove_config_dt() in error handing after dt parsed, so need +disable clocks in stmmac_remove_config_dt(). + +Go through all platforms drivers which use stmmac_probe_config_dt(), +none of them disable clocks manually, so it's safe to disable them in +stmmac_remove_config_dt(). + +Fixes: commit d2ed0a7755fe ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") +Signed-off-by: Joakim Zhang +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c ++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +@@ -626,6 +626,8 @@ error_pclk_get: + void stmmac_remove_config_dt(struct platform_device *pdev, + struct plat_stmmacenet_data *plat) + { ++ clk_disable_unprepare(plat->stmmac_clk); ++ clk_disable_unprepare(plat->pclk); + of_node_put(plat->phy_node); + of_node_put(plat->mdio_node); + } diff --git a/queue-5.10/perf-beauty-update-copy-of-linux-socket.h-with-the-kernel-sources.patch b/queue-5.10/perf-beauty-update-copy-of-linux-socket.h-with-the-kernel-sources.patch new file mode 100644 index 00000000000..d9a541c5788 --- /dev/null +++ b/queue-5.10/perf-beauty-update-copy-of-linux-socket.h-with-the-kernel-sources.patch @@ -0,0 +1,38 @@ +From ef83f9efe8461b8fd71eb60b53dbb6a5dd7b39e9 Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +Date: Sat, 19 Jun 2021 10:09:08 -0300 +Subject: perf beauty: Update copy of linux/socket.h with the kernel sources + +From: Arnaldo Carvalho de Melo + +commit ef83f9efe8461b8fd71eb60b53dbb6a5dd7b39e9 upstream. + +To pick the changes in: + + ea6932d70e223e02 ("net: make get_net_ns return error if NET_NS is disabled") + +That don't result in any changes in the tables generated from that +header. + +This silences this perf build warning: + + Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' + diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h + +Cc: Changbin Du +Cc: David S. Miller +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/trace/beauty/include/linux/socket.h | 2 -- + 1 file changed, 2 deletions(-) + +--- a/tools/perf/trace/beauty/include/linux/socket.h ++++ b/tools/perf/trace/beauty/include/linux/socket.h +@@ -437,6 +437,4 @@ extern int __sys_getpeername(int fd, str + extern int __sys_socketpair(int family, int type, int protocol, + int __user *usockvec); + extern int __sys_shutdown(int fd, int how); +- +-extern struct ns_common *get_net_ns(struct ns_common *ns); + #endif /* _LINUX_SOCKET_H */ diff --git a/queue-5.10/series b/queue-5.10/series index 6d82b371d1d..ab3b13b09d8 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -138,3 +138,7 @@ mm-slub-clarify-verification-reporting.patch mm-slub-fix-redzoning-for-small-allocations.patch mm-slub-actually-fix-freelist-pointer-vs-redzoning.patch mm-slub.c-include-swab.h.patch +net-stmmac-disable-clocks-in-stmmac_remove_config_dt.patch +net-fec_ptp-add-clock-rate-zero-check.patch +tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch +perf-beauty-update-copy-of-linux-socket.h-with-the-kernel-sources.patch diff --git a/queue-5.10/tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch b/queue-5.10/tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch new file mode 100644 index 00000000000..a6a46a8e351 --- /dev/null +++ b/queue-5.10/tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch @@ -0,0 +1,44 @@ +From 1792a59eab9593de2eae36c40c5a22d70f52c026 Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +Date: Sat, 19 Jun 2021 10:15:22 -0300 +Subject: tools headers UAPI: Sync linux/in.h copy with the kernel sources +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Arnaldo Carvalho de Melo + +commit 1792a59eab9593de2eae36c40c5a22d70f52c026 upstream. + +To pick the changes in: + + 321827477360934d ("icmp: don't send out ICMP messages with a source address of 0.0.0.0") + +That don't result in any change in tooling, as INADDR_ are not used to +generate id->string tables used by 'perf trace'. + +This addresses this build warning: + + Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' + diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h + +Cc: David S. Miller +Cc: Toke Høiland-Jørgensen +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/include/uapi/linux/in.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/tools/include/uapi/linux/in.h ++++ b/tools/include/uapi/linux/in.h +@@ -289,6 +289,9 @@ struct sockaddr_in { + /* Address indicating an error return. */ + #define INADDR_NONE ((unsigned long int) 0xffffffff) + ++/* Dummy address for src of ICMP replies if no real address is set (RFC7600). */ ++#define INADDR_DUMMY ((unsigned long int) 0xc0000008) ++ + /* Network number for local host loopback. */ + #define IN_LOOPBACKNET 127 +