Skip to contentSkip to conversation

clocksource: clocksource_select must be called with mutex locked

tip:timers/core tip-bot for Thomas Gleixner 1 participant 1 message Sep 14, 2009 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore
#0 lore raw
Commit-ID:  e6c733050faa93ce616bfedccd279ab12cffdd7b
Gitweb:     http://git.kernel.org/tip/e6c733050faa93ce616bfedccd279ab12cffdd7b
Author:     Thomas Gleixner <[email protected]>
AuthorDate: Mon, 14 Sep 2009 19:51:11 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 14 Sep 2009 21:59:32 +0200

clocksource: clocksource_select must be called with mutex locked

The callers of clocksource_select must hold clocksource_mutex to protect the clocksource_list.

LKML-Reference: <new-submission>
Cc: Martin Schwidefsky <[email protected]>

---
 kernel/time/clocksource.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/time/clocksource.c +2 -0
index 5697155..2c2e5ba 100644
@@ -471,7 +471,9 @@ static void clocksource_select(void)
 static int __init clocksource_done_booting(void)
 {
 	finished_booting = 1;
+	mutex_lock(&clocksource_mutex);
 	clocksource_select();
+	mutex_unlock(&clocksource_mutex);
 	return 0;
 }
 fs_initcall(clocksource_done_booting);