Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665611

[PATCH 1/2] clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable

From Daniel Lezcano <daniel.lezcano@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 1/2] clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable
Date 2017-06-14 11:20 +0200
Message-ID <tScD0-3kg-25@gated-at.bofh.it> (permalink)
References <tScD0-3kg-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Frank Rowand <frank.rowand@sony.com>

Fix boot warning 'Trying to vfree() nonexistent vm area'
from arch_timer_mem_of_init().

Refactored code attempts to read and iounmap using address frame
instead of address ioremap(frame->cntbase).

Fixes: c389d701dfb70 ("clocksource: arm_arch_timer: split MMIO timer probing.")

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Reviewed-by: Fu Wei <fu.wei@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/arm_arch_timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 4bed671..8b5c300 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1209,9 +1209,9 @@ arch_timer_mem_frame_get_cntfrq(struct arch_timer_mem_frame *frame)
 		return 0;
 	}
 
-	rate = readl_relaxed(frame + CNTFRQ);
+	rate = readl_relaxed(base + CNTFRQ);
 
-	iounmap(frame);
+	iounmap(base);
 
 	return rate;
 }
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[GIT PULL] clockevents fixes for 4.12-rc5 Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-14 11:20 +0200
  [PATCH 1/2] clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-14 11:20 +0200

csiph-web