Re: [RFC][PATCH] Use proper casting with signed timespec.tv_nsecvalues

From: Christoph Lameter
Date: Tue Sep 06 2005 - 12:34:06 EST


On Thu, 1 Sep 2005, john stultz wrote:

> I recently ran into a bug with an older kernel where xtime's tv_nsec
> field had accumulated more then 2 seconds worth of time. The timespec's
> tv_nsec is a signed long, however gettimeofday() treats it as an
> unsigned long. Thus when the failure occured, very strange and difficult
> to debug time problems occurred.

How can that happen? I think the source of the problem needs to be fixed.
The fix is only going decrease the likelyhood of the problem occurring.

We may need special measures if the system was frozen for some
reason for longer than a certain time period.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/