Subject: Re: CVS commit: src/sys/compat/linux/common
To: None <manu@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: source-changes
Date: 11/09/2005 17:52:33
Emmanuel Dreyfus wrote:
> Module Name: src
> Committed By: manu
> Date: Tue Nov 8 21:28:49 UTC 2005
>
> Modified Files:
>
> src/sys/compat/linux/common: linux_futex.c
>
> Log Message:
>
> Correctly computes futex timeout.
+ timeout_hz = (timeout.tv_sec * hz)
+ + ((timeout.tv_nsec * hz) / 1000000000);
It looks like we might have the chance of an overflow here.
hz * 999,999,999 will be > 32bits for pretty much any value of hz.
Maybe look at hzto() in kern_clock.c to see how it avoids
overflow?
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Support and Service: http://www.wasabisystems.com/