diff --git a/0006-fix-concurrency-problem.patch b/0006-fix-concurrency-problem.patch index 20349195c76eab682893b4d12452d2a4fa4a0eb0..b005f2eebdde7d853ab13afe0a5fc43d7980e9e9 100644 --- a/0006-fix-concurrency-problem.patch +++ b/0006-fix-concurrency-problem.patch @@ -87,9 +87,9 @@ index bcd624d..0aaab71 100644 { struct file_info *f = INTTYPE_TO_PTR(fi->fh); -+ if (!f->buf) ++ if (!f->buf) + return -EINVAL; -+ ++ switch (f->type) { case LXC_TYPE_PROC_MEMINFO: if (liblxcfs_functional()) diff --git a/0007-set-null-after-free.patch b/0007-set-null-after-free.patch index 2f50681a06d360eb3fc25f3fca230c25bb191b99..1f6db685f04d2b1da0898cedad30eaf664b6db3f 100644 --- a/0007-set-null-after-free.patch +++ b/0007-set-null-after-free.patch @@ -145,7 +145,7 @@ index 5c22fd1..b396bbc 100644 + for (i = 0; clist[i]; i++) { free(clist[i]); + clist[i] = NULL; -+ } ++ } free(clist); } return ret; @@ -251,7 +251,7 @@ index c689c8e..a7e4a58 100644 + for (int i = 0; list[i]; i++) { free(list[i]); + list[i] = NULL; -+ } ++ } free_disarm(list); } } @@ -267,7 +267,7 @@ index 5f9bec7..c8daf35 100644 + for (; i > 0; i--) { free(idbuf[i - 1]); + idbuf[i - 1] = NULL; -+ } ++ } out: free(idbuf); + idbuf = NULL; diff --git a/0020-enable-cfs-option-to-show-correct-proc-cpuinfo-view.patch b/0020-enable-cfs-option-to-show-correct-proc-cpuinfo-view.patch new file mode 100644 index 0000000000000000000000000000000000000000..ac487170a4c82f34ec23d5e0f3a1ef194e4beb67 --- /dev/null +++ b/0020-enable-cfs-option-to-show-correct-proc-cpuinfo-view.patch @@ -0,0 +1,25 @@ +From ba38ee0ef8e375ae7e1b19d6e99626b1152ddef8 Mon Sep 17 00:00:00 2001 +From: vegbir +Date: Mon, 4 Jul 2022 17:15:19 +0800 +Subject: [PATCH] enable cfs option to show correct proc cpuinfo view + +--- + config/init/systemd/lxcfs.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/init/systemd/lxcfs.service b/config/init/systemd/lxcfs.service +index dbb029f..f24e11b 100644 +--- a/config/init/systemd/lxcfs.service ++++ b/config/init/systemd/lxcfs.service +@@ -5,7 +5,7 @@ Before=lxc.service + Documentation=man:lxcfs(1) + + [Service] +-ExecStart=/usr/bin/lxcfs /usr/local/var/lib/lxcfs ++ExecStart=/usr/bin/lxcfs --enable-cfs /usr/local/var/lib/lxcfs + KillMode=process + Restart=on-failure + ExecStopPost=-/bin/fusermount -u /usr/local/var/lib/lxcfs +-- +2.32.1 (Apple Git-133) + diff --git a/lxcfs.spec b/lxcfs.spec index 854cc9d4668d971a88427373329cbbe6151faa31..b6b7e2c88c823e4f2957975af84dc7170cede01f 100644 --- a/lxcfs.spec +++ b/lxcfs.spec @@ -4,7 +4,7 @@ #Basic Information Name: lxcfs Version: 4.0.11 -Release: 3 +Release: 4 Summary: FUSE filesystem for LXC License: LGPL 2.1+ URL: http://linuxcontainers.org @@ -29,6 +29,7 @@ Patch9016: 0016-remove-lxcfs-tools-dependency-for-common-use.patch Patch9017: 0017-proc_fuse-fix-wait-child-process-hang.patch Patch9018: 0018-fix-deadlock-problem-when-subprocess-exit.patch Patch9019: 0019-fix-dev-read-memory-leak-in-container.patch +Patch9020: 0020-enable-cfs-option-to-show-correct-proc-cpuinfo-view.patch #Dependency BuildRequires: autoconf automake libtool help2man @@ -90,6 +91,9 @@ fi %{_unitdir}/* %changelog +* Mon Jul 04 2022 yangjiaqi - 4.0.11-4 +- enable cfs option to show correct proc cpuinfo view + * Wed May 11 2022 zhangsong234 - 4.0.11-3 - fix dev read memory leak in container