From: Thomas Gleixner Date: Mon, 14 Sep 2009 17:51:11 +0000 (+0200) Subject: clocksource: clocksource_select must be called with mutex locked X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e6c733050faa93ce616bfedccd279ab12cffdd7b;p=linux.git clocksource: clocksource_select must be called with mutex locked The callers of clocksource_select must hold clocksource_mutex to protect the clocksource_list. Signed-off-by: Thomas Gleixner LKML-Reference: Cc: Martin Schwidefsky --- diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 5697155f18680..2c2e5ba1453d4 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -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);