lkml.org 
[lkml]   [2009]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: 2.6.28, limiting cpu time doesn't work
    Date
    Oleg Nesterov wrote:

    > I am not sure what should we do, this needs more discussion.
    >
    > Probably the most simple patch for -stable and 2.6.29 is below.
    > (with this patch we don't even need update_rlimit_cpu(), afaics).

    tested on both 2.6.28.9 and 2.6.29 - RLIMIT_CPU works as expected

    > --- a/kernel/posix-cpu-timers.c
    > +++ b/kernel/posix-cpu-timers.c
    > @@ -1263,7 +1263,8 @@ static inline int fastpath_timer_check(s
    > if (task_cputime_expired(&group_sample, &sig->cputime_expires))
    > return 1;
    > }
    > - return 0;
    > +
    > + return sig->rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY;
    > }
    >
    > /*



    \
     
     \ /
      Last update: 2009-03-24 03:47    [W:0.022 / U:1.116 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site