Subject: + kernel-timerc-fix-jiffies-wrap-behavior-of-round_jiffies.patch added to -mm tree To: bart.vanassche@xxxxxxxxx,arjan@xxxxxxxxxxxxx,bvanassche@xxxxxxx,sfr@xxxxxxxxxxxxxxxx,tglx@xxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 29 May 2013 16:01:58 -0700 The patch titled Subject: kernel/timer.c: fix jiffies wrap behavior of round_jiffies*() has been added to the -mm tree. Its filename is kernel-timerc-fix-jiffies-wrap-behavior-of-round_jiffies.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Bart Van Assche <bart.vanassche@xxxxxxxxx> Subject: kernel/timer.c: fix jiffies wrap behavior of round_jiffies*() Make sure that the round_jiffies*() functions return a time that is in the future when the jiffies counter has recently wrapped. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxx> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -puN kernel/timer.c~kernel-timerc-fix-jiffies-wrap-behavior-of-round_jiffies kernel/timer.c --- a/kernel/timer.c~kernel-timerc-fix-jiffies-wrap-behavior-of-round_jiffies +++ a/kernel/timer.c @@ -149,9 +149,7 @@ static unsigned long round_jiffies_commo /* now that we have rounded, subtract the extra skew again */ j -= cpu * 3; - if (j <= jiffies) /* rounding ate our timeout entirely; */ - return original; - return j; + return time_is_after_jiffies(j) ? j : original; } /** _ Patches currently in -mm which might be from bart.vanassche@xxxxxxxxx are kernel-timerc-fix-jiffies-wrap-behavior-of-round_jiffies.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html