X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fposix-cpu-timers.c;h=0b7c82ac467eb1db24e0614fe7cc1d2704d27a48;hb=259d4e41f3ec25f22169daece42729f597b89f9a;hp=2c076b36c4f66b6dfedc986408306e644338f449;hpb=78f2c7db6068fd6ef75b8c120f04a388848eacb5;p=linux-2.6 diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 2c076b36c4..0b7c82ac46 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -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.