[PATCH] process-wide itimer typo fixes

Roland McGrath
2005-02-23T21:44:12Z

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@redhat.com>

--- 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);