[PATCH] clockresource/npcm: Fix kernel pointer leak

Guo Zhi qtxuning1999 at sjtu.edu.cn
Wed Sep 29 21:04:29 AEST 2021


Pointers should be printed with %p rather than %px
which printed kernel pointer directly.
Change %px to %p to print the secured pointer.

Signed-off-by: Guo Zhi <qtxuning1999 at sjtu.edu.cn>
---
 drivers/clocksource/timer-npcm7xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/timer-npcm7xx.c
index a00520cbb660..bf477685d545 100644
--- a/drivers/clocksource/timer-npcm7xx.c
+++ b/drivers/clocksource/timer-npcm7xx.c
@@ -202,7 +202,7 @@ static int __init npcm7xx_timer_init(struct device_node *np)
 	npcm7xx_clocksource_init();
 	npcm7xx_clockevents_init();
 
-	pr_info("Enabling NPCM7xx clocksource timer base: %px, IRQ: %d ",
+	pr_info("Enabling NPCM7xx clocksource timer base: %p, IRQ: %d ",
 		timer_of_base(&npcm7xx_to), timer_of_irq(&npcm7xx_to));
 
 	return 0;
-- 
2.33.0



More information about the openbmc mailing list