Re: [PATCH 1/3] 2.6.14-rc2-mm1: fixes for overflow msec_to_jiffies()

Andrew Morton
2005-09-29T09:43:45Z

Willy Tarreau <willy@w.ods.org> wrote:
>
> +#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
> +# define MAX_MSEC_OFFSET \
> + (ULONG_MAX - (MSEC_PER_SEC / HZ) + 1)

That generates numbers which don't fit into unsigned ints, yielding vast
numbers of

include/linux/jiffies.h: In function `msecs_to_jiffies':
include/linux/jiffies.h:310: warning: comparison is always false due to limited range of data type
include/linux/jiffies.h: In function `usecs_to_jiffies':
include/linux/jiffies.h:323: warning: comparison is always false due to limited range of data type