On Wed, Oct 22, 2014 at 5:37 AM, Xunlei Pang <pang.xun...@linaro.org> wrote: > The mult memember of struct clocksource should always be a large u32 number > when calculated through > __clocksource_updatefreq_scale(). The value of (cs->mult+cs->maxadj) may > have a chance to reach very > near 0xFFFFFFFF, so it may overflow when doing NTP positive adjustment, see > the following detail: > When NTP slewes the clock, kernel goes through > update_wall_time()->...->timekeeping_apply_adjustment(): > tk->tkr.mult += mult_adj; > Unfortunately, tk->tkr.mult may overflow after this operation. > > > This patch avoids mult overflow by judging the overflow case before adding > mult_adj to mult, also adds the > WARNING message when capturing such case. > > Signed-off-by: pang.xunlei <pang.xun...@linaro.org>
I reworded this a bit further, but its in my queue for 3.19. thanks -john -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/