[PATCH] process-wide itimer typo fixes

From: Roland McGrath
Date: Wed Feb 23 2005 - 16:48:54 EST


Thanks for finding that.

Ack! I did a quick merge of my well-tested patches with the cputime_t
stuff, and apparently didn't do quite as much testing as I thought I did.
There was a little query/replace error in my per-process-itimer-cpu patch
now in -mm. Your patch is necessary but not sufficient. This patch fixes
all the errors.


Thanks,
Roland


Signed-off-by: Roland McGrath <roland@xxxxxxxxxx>

--- linux-2.6/kernel/itimer.c
+++ linux-2.6/kernel/itimer.c
@@ -56,9 +56,9 @@ int do_getitimer(int which, struct itime
t = next_thread(t);
} while (t != tsk);
if (cputime_le(cval, utime)) { /* about to fire */
- val = jiffies_to_cputime(1);
+ cval = jiffies_to_cputime(1);
} else {
- val = cputime_sub(val, utime);
+ cval = cputime_sub(cval, utime);
}
}
spin_unlock_irq(&tsk->sighand->siglock);
@@ -82,9 +82,9 @@ int do_getitimer(int which, struct itime
t = next_thread(t);
} while (t != tsk);
if (cputime_le(cval, ptime)) { /* about to fire */
- val = jiffies_to_cputime(1);
+ cval = jiffies_to_cputime(1);
} else {
- val = cputime_sub(val, ptime);
+ cval = cputime_sub(cval, ptime);
}
}
spin_unlock_irq(&tsk->sighand->siglock);

-
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/