提交 dcb86b87 编写于 作者: Y YueHaibing 提交者: Yang Yingliang

net: xilinx_emaclite: Do not print real IOMEM pointer

stable inclusion
from linux-4.19.204
commit 9322401477a6d1f9de8f18e5d6eb43a68e0b113a
CVE: CVE-2021-38205

--------------------------------

commit d0d62baa 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: NYueHaibing <yuehaibing@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NPavel Machek (CIP) <pavel@denx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 06e27c9a
...@@ -1177,9 +1177,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev) ...@@ -1177,9 +1177,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
} }
dev_info(dev, dev_info(dev,
"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n", "Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
(unsigned int __force)ndev->mem_start, (unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
(unsigned int __force)lp->base_addr, ndev->irq);
return 0; return 0;
error: error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册