Skip to content

Commit

Permalink
clocksource: clocksource_select must be called with mutex locked
Browse files Browse the repository at this point in the history
The callers of clocksource_select must hold clocksource_mutex to
protect the clocksource_list.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Thomas Gleixner committed Sep 14, 2009
1 parent f79e025 commit e6c7330
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/time/clocksource.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e6c7330

Please sign in to comment.