]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/posix-cpu-timers.c
sched: rt-watchdog: fix .rlim_max = RLIM_INFINITY
[linux-2.6-omap-h63xx.git] / kernel / posix-cpu-timers.c
index 2c076b36c4f66b6dfedc986408306e644338f449..0b7c82ac467eb1db24e0614fe7cc1d2704d27a48 100644 (file)
@@ -1020,7 +1020,8 @@ static void check_thread_timers(struct task_struct *tsk,
                unsigned long hard = sig->rlim[RLIMIT_RTTIME].rlim_max;
                unsigned long *soft = &sig->rlim[RLIMIT_RTTIME].rlim_cur;
 
-               if (tsk->rt.timeout > DIV_ROUND_UP(hard, USEC_PER_SEC/HZ)) {
+               if (hard != RLIM_INFINITY &&
+                   tsk->rt.timeout > DIV_ROUND_UP(hard, USEC_PER_SEC/HZ)) {
                        /*
                         * At the hard limit, we just die.
                         * No need to calculate anything else now.