From: Greg Kroah-Hartman Date: Mon, 21 Jun 2021 14:03:23 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.4.128~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdcea3e814c5df4e96ddab28bf4183c311d9ba84;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: net-fec_ptp-add-clock-rate-zero-check.patch tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch --- diff --git a/queue-4.19/net-fec_ptp-add-clock-rate-zero-check.patch b/queue-4.19/net-fec_ptp-add-clock-rate-zero-check.patch new file mode 100644 index 00000000000..530d3413811 --- /dev/null +++ b/queue-4.19/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 +@@ -597,6 +597,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-4.19/series b/queue-4.19/series index ea505864ff9..be581f7d930 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -72,3 +72,5 @@ net-bridge-fix-vlan-tunnel-dst-null-pointer-dereference.patch net-bridge-fix-vlan-tunnel-dst-refcnt-when-egressing.patch mm-slub-clarify-verification-reporting.patch mm-slub.c-include-swab.h.patch +net-fec_ptp-add-clock-rate-zero-check.patch +tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch diff --git a/queue-4.19/tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch b/queue-4.19/tools-headers-uapi-sync-linux-in.h-copy-with-the-kernel-sources.patch new file mode 100644 index 00000000000..c1b8a0d20ed --- /dev/null +++ b/queue-4.19/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 +@@ -280,6 +280,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 +