Merge tag 'time-namespace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / fs / proc / stat.c
index 4695b6d..f25e853 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/time.h>
+#include <linux/time_namespace.h>
 #include <linux/irqnr.h>
 #include <linux/sched/cputime.h>
 #include <linux/tick.h>
@@ -118,6 +119,8 @@ static int show_stat(struct seq_file *p, void *v)
                irq = softirq = steal = 0;
        guest = guest_nice = 0;
        getboottime64(&boottime);
+       /* shift boot timestamp according to the timens offset */
+       timens_sub_boottime(&boottime);
 
        for_each_possible_cpu(i) {
                struct kernel_cpustat kcpustat;