The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/192

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Closes #189

This seems to be responsible for corrupting STIME on processlist
inside containers.  Hopefully we can find a reasonable way to fix
both, but compared to unvirtualized btime field, bogus STIME field
is the greater evil here.

Signed-off-by: Serge Hallyn <[email protected]>
From 9502bae2b6e9a62a870c303e9776722082f6ce6c Mon Sep 17 00:00:00 2001
From: Serge Hallyn <[email protected]>
Date: Sun, 18 Jun 2017 14:43:22 -0500
Subject: [PATCH] (temporarily?) revert the virtualization of btime field in
 /proc/stat

Closes #189

This seems to be responsible for corrupting STIME on processlist
inside containers.  Hopefully we can find a reasonable way to fix
both, but compared to unvirtualized btime field, bogus STIME field
is the greater evil here.

Signed-off-by: Serge Hallyn <[email protected]>
---
 bindings.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/bindings.c b/bindings.c
index f3aefa1..1442b9a 100644
--- a/bindings.c
+++ b/bindings.c
@@ -3672,10 +3672,7 @@ static int proc_stat_read(char *buf, size_t size, off_t 
offset,
                        continue;
                if (sscanf(line, "cpu%9[^ ]", cpu_char) != 1) {
                        /* not a ^cpuN line containing a number N, just print 
it */
-                       if (strncmp(line, "btime", 5) == 0)
-                               l = snprintf(cache, cache_size, "btime 
%"PRIu64"\n", get_reaper_btime(fc->pid));
-                       else
-                               l = snprintf(cache, cache_size, "%s", line);
+                       l = snprintf(cache, cache_size, "%s", line);
                        if (l < 0) {
                                perror("Error writing to cache");
                                rv = 0;
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to