]> bbs.cooldavid.org Git - net-next-2.6.git/commit - fs/select.c
hrtimer: fix signed/unsigned bug in slack estimator
authorArjan van de Ven <arjan@linux.intel.com>
Sun, 7 Sep 2008 23:08:55 +0000 (16:08 -0700)
committerArjan van de Ven <arjan@linux.intel.com>
Sun, 7 Sep 2008 23:11:04 +0000 (16:11 -0700)
commit96d2ab484e7a9bafdab44b8c7d1ef5944319b18c
tree3938e40a4b70295d7318d6b14777d0f02004438d
parent704af52bd13a5d9f3c60c496c68e752fafdfb434
hrtimer: fix signed/unsigned bug in slack estimator

the slack estimator used unsigned math; however for very short delay it's
possible that by the time you calculate the timeout, it's already passed and
you get a negative time/slack... in an unsigned variable... which then gets
turned into a 100 msec delay rather than zero.

This patch fixes this by using a signed typee in the right places.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
fs/select.c