From: YueHaibing
stable inclusion
from linux-4.19.204
commit 9322401477a6d1f9de8f18e5d6eb43a68e0b113a
category: bugfix
issue: #I49DQI
CVE: CVE-2021-38205
--------------------------------
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
Signed-off-by: David S. Miller
Signed-off-by: Pavel Machek (CIP)
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Yang Yingliang
Reviewed-by: Xiu Jianfeng
Reviewed-by: Yue Haibing
Signed-off-by: Yang Yingliang
Signed-off-by: Yu Changchun
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index c77c81eb7ab3..edb2215f9993 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1177,9 +1177,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
}
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:
--
2.22.0