Re: [PATCH] 2.5.43 CSA, Job, and PAGG

Dave Jones
2002-10-17T18:44:16Z

On Thu, Oct 17, 2002 at 12:50:52PM -0500, Robin Holt wrote:

> > The first two lines in the csa patch contain an obvious jiffy-wrap bug.
>
> Fixed. The patch file named above is now a link to
> linux-2.5.43_002-csa.patch. The old file is linux-2.5.43_001-csa.patch
>
> If you could re-review, I would appreciate it.

Casting it to a ulong won't help you.
Imagine jiffies begins at 0xffffffff

unsigned long start_wait = jiffies;
...
current->bwtime += (unsigned long) jiffies - start_wait;

and when you read it the second time, it's rolled over to 0x00000001

You now increment bwtime by $BIGNUM

--
| Dave Jones. http://www.codemonkey.org.uk