Re: Regression in posix-cpu-timers.c (was Re: Linux 5.14.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



at 20:31 on Wed 15-Sep-2021 Frederic Weisbecker (frederic@xxxxxxxxxx) wrote:

> Right, this should fix the issue: https://lore.kernel.org/lkml/20210913145332.232023-1-frederic@xxxxxxxxxx/

Indeed it does.

# uname -a
Linux bilbo 5.14.4-dirty #15 SMP PREEMPT Wed Sep 15 20:10:28 BST 2021
x86_64 AMD FX(tm)-4300 Quad-Core Processor AuthenticAMD GNU/Linux

# su apache -s /bin/bash -c "cd /var/www/htdocs/nextcloud/ && php occ maintenance:mode --off"
Maintenance mode disabled
#

$ git diff
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index a002685f688d..8cb280237327 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1346,7 +1346,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid,
                        }
                }
 
-               *newval += now;
+               if (*newval)
+                       *newval += now;
        }
 
        /*

Thanks
Alan

-- 
Alan J. Wylie                                          https://www.wylie.me.uk/

Dance like no-one's watching. / Encrypt like everyone is.
Security is inversely proportional to convenience



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux