]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Aug 2021 10:39:37 +0000 (12:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Aug 2021 10:39:37 +0000 (12:39 +0200)
added patches:
net-xilinx_emaclite-do-not-print-real-iomem-pointer.patch

queue-5.4/net-xilinx_emaclite-do-not-print-real-iomem-pointer.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/net-xilinx_emaclite-do-not-print-real-iomem-pointer.patch b/queue-5.4/net-xilinx_emaclite-do-not-print-real-iomem-pointer.patch
new file mode 100644 (file)
index 0000000..2ac187d
--- /dev/null
@@ -0,0 +1,37 @@
+From d0d62baa7f505bd4c59cd169692ff07ec49dde37 Mon Sep 17 00:00:00 2001
+From: YueHaibing <yuehaibing@huawei.com>
+Date: Wed, 19 May 2021 10:47:04 +0800
+Subject: net: xilinx_emaclite: Do not print real IOMEM pointer
+
+From: YueHaibing <yuehaibing@huawei.com>
+
+commit d0d62baa7f505bd4c59cd169692ff07ec49dde37 upstream.
+
+Printing kernel pointers is discouraged because they might leak kernel
+memory layout.  This fixes smatch warning:
+
+drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn:
+ argument 4 to %08lX specifier is cast from pointer
+
+Signed-off-by: YueHaibing <yuehaibing@huawei.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/xilinx/xilinx_emaclite.c |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
++++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+@@ -1191,9 +1191,8 @@ static int xemaclite_of_probe(struct pla
+       }
+       dev_info(dev,
+-               "Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n",
+-               (unsigned int __force)ndev->mem_start,
+-               (unsigned int __force)lp->base_addr, ndev->irq);
++               "Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
++               (unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
+       return 0;
+ error:
index d9862cbf17b7b80f2eeec6d89adb975b814c106b..f2bb82ace480dca0544359f34b24055a2284b5c0 100644 (file)
@@ -21,3 +21,4 @@ btrfs-qgroup-try-to-flush-qgroup-space-when-we-get-edquot.patch
 btrfs-transaction-cleanup-unused-trans_state_blocked.patch
 btrfs-qgroup-remove-async_commit-mechanism-in-favor-of-reserve-retry-after-edquot.patch
 btrfs-fix-lockdep-splat-when-enabling-and-disabling-qgroups.patch
+net-xilinx_emaclite-do-not-print-real-iomem-pointer.patch