lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 38/44] posix-cpu-timers: Respect INFINITY for hard RTTIME limit

    * Thomas Gleixner <tglx@linutronix.de> wrote:

    > The RTIME limit expiry code does not check the hard RTTIME limit for
    > INFINITY, i.e. being disabled. Add it.
    >
    > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    > ---
    > kernel/time/posix-cpu-timers.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > --- a/kernel/time/posix-cpu-timers.c
    > +++ b/kernel/time/posix-cpu-timers.c
    > @@ -905,7 +905,7 @@ static void check_process_timers(struct
    > u64 softns, ptime = samples[CPUCLOCK_PROF];
    > unsigned long psecs = div_u64(ptime, NSEC_PER_SEC);
    >
    > - if (psecs >= hard) {
    > + if (hard != RLIM_INFINITY && psecs >= hard) {
    > /*
    > * At the hard limit, we just die.
    > * No need to calculate anything else now.

    Might make sense to mark this as a possible ABI change in the changelog:
    if some weird code learned to rely on this (arguably broken) behavior
    then the bug turned into an ABI.

    Thanks,

    Ingo

    \
     
     \ /
      Last update: 2019-08-19 22:07    [W:4.170 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site