From: Thomas Gleixner Date: Tue, 25 May 2010 18:43:30 +0000 (+0200) Subject: timers: Fix slack calculation really X-Git-Tag: v2.6.35-rc1~26^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e63d7795e30b4091e303cc8c060509bd8eea742;p=pandora-kernel.git timers: Fix slack calculation really commit f00e047ef (timers: Fix slack calculation for expired timers) fixed the issue of slack on expired timers only partially. Linus noticed that jiffies is volatile so it is reloaded twice, which generates bad code. But its worse. This can defeat the time_after() check if jiffies are incremented between time_after() and the slack calculation. Fix it by reading jiffies into a local variable, which prevents the compiler from loading it twice. While at it make the > -1 check into >= 0 which is easier to read. Signed-off-by: Thomas Gleixner Cc: Arjan van de Ven Cc: Linus Torvalds --- Reading git-diff-tree failed