]> git.proxmox.com Git - lxcfs.git/commitdiff
Update to latest upstream 2.0.0.beta1
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 17 Feb 2016 10:01:04 +0000 (11:01 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 17 Feb 2016 10:40:57 +0000 (11:40 +0100)
Commit 551c58dd1a7fbaebe92dd0f1f80f1789faa3a2eb

Drop patches applied upstream:
- 0001-fix-missing-dereferencing-in-must_strcat_pid.patch
- 0001-uptime-fix-pid1-and-reaper_busy-times.patch
- 0003-fix-leak-in-realloc-loop-in-must_strcat_pid.patch
- 0004-cgfs-fix-dorealloc-s-batch-allocation.patch

Update systemd unit to reflect options dropped upstream.

Makefile
debian/changelog
debian/lxcfs.service
debian/patches/0001-fix-missing-dereferencing-in-must_strcat_pid.patch [deleted file]
debian/patches/0001-uptime-fix-pid1-and-reaper_busy-times.patch [deleted file]
debian/patches/0003-fix-leak-in-realloc-loop-in-must_strcat_pid.patch [deleted file]
debian/patches/0004-cgfs-fix-dorealloc-s-batch-allocation.patch [deleted file]
debian/patches/series
lxcfs.tgz

index ed8587de24daf87ea511e2d21b841a1f47d7b348..bf2edfac0726c06c2fe2371b0a25cb95f7ad79cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 RELEASE=4.1
 
 PACKAGE=lxcfs
-PKGVER=0.13
-DEBREL=pve3
+PKGVER=2.0.0
+DEBREL=pve1
 
 SRCDIR=${PACKAGE}
 SRCTAR=${SRCDIR}.tgz
index f3684fbb3a5c2040506eb9791cdffc21b128e8dd..2a0bbe99d3c8513ca9b6851b8b82f3e46d07aef7 100644 (file)
@@ -1,3 +1,9 @@
+lxcfs (2.0.0-pve1) unstable; urgency=medium
+
+  * update to 2.0.0-beta1 (Commit 551c58dd1a7fbaebe92dd0f1f80f1789faa3a2eb)
+  
+ -- Proxmox Support Team <support@proxmox.com>  Wed, 17 Feb 2016 11:39:48 +0100
+
 lxcfs (0.13-pve3) unstable; urgency=medium
 
   * Add realloc fixes
index 395842c5d873f625783bd09e300bcdc64e4aa6e3..c0f29986148a2e6b333a177a2a8d076487f8e277 100644 (file)
@@ -4,7 +4,7 @@ ConditionVirtualization=!container
 Before=lxc.service
 
 [Service]
-ExecStart=/usr/bin/lxcfs -f -s -o allow_other /var/lib/lxcfs/
+ExecStart=/usr/bin/lxcfs /var/lib/lxcfs/
 KillMode=none
 Restart=on-failure
 ExecStop=/bin/fusermount -u /var/lib/lxcfs
diff --git a/debian/patches/0001-fix-missing-dereferencing-in-must_strcat_pid.patch b/debian/patches/0001-fix-missing-dereferencing-in-must_strcat_pid.patch
deleted file mode 100644 (file)
index 06fe5ce..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From ab9a41700a2b9d422ab0fda1fe3873b4ae70b47b Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Thu, 7 Jan 2016 11:23:24 +0100
-Subject: [PATCH lxcfs 1/5] fix missing dereferencing in must_strcat_pid
-
-Fixes a segfault when reading a /tasks file of a cgroup
-containing a large number of pids.
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
----
- lxcfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lxcfs.c b/lxcfs.c
-index fe5ac3e..767a344 100644
---- a/lxcfs.c
-+++ b/lxcfs.c
-@@ -85,7 +85,7 @@ static void must_strcat_pid(char **src, size_t *sz, size_t *asz, pid_t pid)
-               } while (!d);
-               *src = d;
-               *asz = BUF_RESERVE_SIZE;
--      } else if (strlen(tmp) + sz + 1 >= asz) {
-+      } else if (strlen(tmp) + *sz + 1 >= *asz) {
-               do {
-                       d = realloc(d, *asz + BUF_RESERVE_SIZE);
-               } while (!d);
--- 
-2.1.4
-
diff --git a/debian/patches/0001-uptime-fix-pid1-and-reaper_busy-times.patch b/debian/patches/0001-uptime-fix-pid1-and-reaper_busy-times.patch
deleted file mode 100644 (file)
index d4c24c9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From bb3f1796d71b17a2dd0502b2c43a38d6d07efb46 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Mon, 14 Dec 2015 08:57:12 +0100
-Subject: [PATCH lxcfs] uptime: fix pid1 and reaper_busy times
-
-- reaper_busy was off by a factor of 10 (possibly originally
-for precision?)
-- get_pid1_time was expecting a '1' byte like in
-the pid_to/from_ns_wrapper functions instead of reading its
-value which is what is actually written
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
----
- lxcfs.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/lxcfs.c b/lxcfs.c
-index 90a0b7f..fe5ac3e 100644
---- a/lxcfs.c
-+++ b/lxcfs.c
-@@ -2449,10 +2449,9 @@ static long int get_pid1_time(pid_t pid)
-       ret = select(cpipe[0]+1, &s, NULL, NULL, &tv);
-       if (ret <= 0)
-               goto fail;
--      ret = read(cpipe[0], &v, 1);
--      if (ret != sizeof(char) || v != '1') {
-+      ret = read(cpipe[0], &v, sizeof(v));
-+      if (ret != sizeof(v))
-               goto fail;
--      }
-       wait_for_pid(cpid);
-@@ -2607,7 +2606,7 @@ static unsigned long get_reaper_busy(pid_t task)
-       if (!cgfs_get_value("cpuacct", cgroup, "cpuacct.usage", &usage_str))
-               goto out;
-       usage = strtoul(usage_str, NULL, 10);
--      usage /= 100000000;
-+      usage /= 1000000000;
- out:
-       free(cgroup);
--- 
-2.1.4
-
diff --git a/debian/patches/0003-fix-leak-in-realloc-loop-in-must_strcat_pid.patch b/debian/patches/0003-fix-leak-in-realloc-loop-in-must_strcat_pid.patch
deleted file mode 100644 (file)
index bfe6239..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-From cc1d9baadd760a3e6fc757d31569fbf46ad37dbd Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Thu, 7 Jan 2016 11:32:59 +0100
-Subject: [PATCH lxcfs 3/5] fix leak in realloc loop in must_strcat_pid
-
-If the first realloc() call fails then 'd' becomes NULL,
-subsequent realloc() retries will behave like malloc() and
-the the original src pointer is never freed. Further more
-the newly allocated data then contains uninitialized data
-where the previous pids had been stored.
-Avoid this by passing the the original pointer from '*src'
-to realloc().
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
----
- lxcfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lxcfs.c b/lxcfs.c
-index 8605000..d738e79 100644
---- a/lxcfs.c
-+++ b/lxcfs.c
-@@ -87,7 +87,7 @@ static void must_strcat_pid(char **src, size_t *sz, size_t *asz, pid_t pid)
-               *asz = BUF_RESERVE_SIZE;
-       } else if (tmplen + *sz + 1 >= *asz) {
-               do {
--                      d = realloc(d, *asz + BUF_RESERVE_SIZE);
-+                      d = realloc(*src, *asz + BUF_RESERVE_SIZE);
-               } while (!d);
-               *src = d;
-               *asz += BUF_RESERVE_SIZE;
--- 
-2.1.4
-
diff --git a/debian/patches/0004-cgfs-fix-dorealloc-s-batch-allocation.patch b/debian/patches/0004-cgfs-fix-dorealloc-s-batch-allocation.patch
deleted file mode 100644 (file)
index d4db54b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-From 4d373ffcfee6853662421370fad3df3701573712 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Thu, 7 Jan 2016 12:49:51 +0100
-Subject: [PATCH lxcfs 4/5] cgfs: fix dorealloc's batch allocation
-
-The initial check should use real lengths as with modulo a
-new required length of eg. 52 would be considered smaller
-than an old length of 48 (2 < 48).
-
-To get the 'batches' count 'newlen' must be divided and not
-taken modulo BATCH_SIZE. Otherwise '101', which would need a
-3rd batch to reach 150, would end up with two (2*50 = 100
-bytes) and thereby be truncated instead.
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
----
- cgfs.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cgfs.c b/cgfs.c
-index 0659e9e..681a478 100644
---- a/cgfs.c
-+++ b/cgfs.c
-@@ -75,9 +75,9 @@ static inline void drop_trailing_newlines(char *s)
- static void dorealloc(char **mem, size_t oldlen, size_t newlen)
- {
-       int batches;
--      if (newlen % BATCH_SIZE <= oldlen % BATCH_SIZE)
-+      if (newlen <= oldlen)
-               return;
--      batches = (newlen % BATCH_SIZE) + 1;
-+      batches = (newlen / BATCH_SIZE) + 1;
-       if (!*mem) {
-               do {
-                       *mem = malloc(batches * BATCH_SIZE);
--- 
-2.1.4
-
index 345ea63c38dc79cdd01e4f606b6cfa54fb7df0ff..bf650b42b1037ca3c7f99c19421c9e1728402554 100644 (file)
@@ -1,5 +1 @@
 do-not-start-without-lxcfs.patch
-0001-uptime-fix-pid1-and-reaper_busy-times.patch
-0001-fix-missing-dereferencing-in-must_strcat_pid.patch
-0003-fix-leak-in-realloc-loop-in-must_strcat_pid.patch
-0004-cgfs-fix-dorealloc-s-batch-allocation.patch
index f255e286d6d87ead164a4e696119fa6070fa93e3..e2f9a13d1502d28a9cff1e1b2ec1bde5d3e89d71 100644 (file)
Binary files a/lxcfs.tgz and b/lxcfs.tgz differ