[lkml]   [2010]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[RESEND][PATCH] Fix oops on !GENERIC_TIME systems when accessing current_clocksource
    No one has replied to this, so I wanted to send it out again.

    Aaro Koskinen reported an issue in bug #15366, where on non-GENERIC_TIME
    accessing /sys/devices/system/clocksource/clocksource0/current_clocksource would oops the system.

    It seems the timekeeper/clocksource rework missed initializing the
    curr_clocksource value in the !GENERIC_TIME.

    The following patch makes sure it gets initialized, and avoids the

    Thanks to Aaro for reporting and diagnosing the issue as well as testing
    the fix!

    Bug Details:

    Too late for 2.6.33, but this likely should go into 2.6.33-stable and


    Signed-off-by: John Stultz <>

    diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
    index e85c234..c436ee5 100644
    --- a/kernel/time/clocksource.c
    +++ b/kernel/time/clocksource.c
    @@ -568,6 +568,10 @@ static inline void clocksource_select(void) { }
    static int __init clocksource_done_booting(void)
    + mutex_lock(&clocksource_mutex);
    + curr_clocksource = clocksource_default_clock();
    + mutex_unlock(&clocksource_mutex);
    finished_booting = 1;


     \ /
      Last update: 2010-03-01 21:37    [W:0.022 / U:3.168 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site