From 2c92a60fcc6907f5d03cb9983ea891fb4e82696b Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Fri, 17 Sep 2021 11:15:36 +0800 Subject: [PATCH] seccomp: init and destroy notifier.cookie Signed-off-by: zhangxiaoyu (cherry picked from commit d65f9480282b2ef45a89469340260f28a8804fee) --- ...omp-init-and-destroy-notifier.cookie.patch | 37 +++++++++++++++++++ lxc.spec | 9 ++++- series.conf | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0028-seccomp-init-and-destroy-notifier.cookie.patch diff --git a/0028-seccomp-init-and-destroy-notifier.cookie.patch b/0028-seccomp-init-and-destroy-notifier.cookie.patch new file mode 100644 index 0000000..bc983eb --- /dev/null +++ b/0028-seccomp-init-and-destroy-notifier.cookie.patch @@ -0,0 +1,37 @@ +From aca2dde947317d4e3c1a75ec7fdebf2ae70878a2 Mon Sep 17 00:00:00 2001 +From: Evgeny Vereshchagin +Date: Thu, 15 Apr 2021 07:09:10 +0000 +Subject: [PATCH] seccomp: init and destroy notifier.cookie + +It's a follow-up to 84cf6d259b24e4ad48e + +Closes https://github.com/lxc/lxc/issues/3806 + +Signed-off-by: Evgeny Vereshchagin +--- + src/lxc/seccomp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c +index 4b9d23c55..ebbba80f7 100644 +--- a/src/lxc/seccomp.c ++++ b/src/lxc/seccomp.c +@@ -1867,6 +1867,7 @@ void lxc_seccomp_free(struct lxc_seccomp *seccomp) + seccomp_notify_free(seccomp->notifier.req_buf, seccomp->notifier.rsp_buf); + seccomp->notifier.req_buf = NULL; + seccomp->notifier.rsp_buf = NULL; ++ free_disarm(seccomp->notifier.cookie); + #endif + } + +@@ -2076,6 +2077,7 @@ void seccomp_conf_init(struct lxc_conf *conf) + sizeof(conf->seccomp.notifier.proxy_addr)); + conf->seccomp.notifier.req_buf = NULL; + conf->seccomp.notifier.rsp_buf = NULL; ++ conf->seccomp.notifier.cookie = NULL; + #endif + } + +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index 3d3ff32..1c95abb 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2021082601 +%global _release 2021091701 Name: lxc Version: 4.0.3 @@ -35,6 +35,7 @@ Patch0024: 0024-log-adjust-log-level-from-error-to-warn.patch Patch0025: 0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch Patch0026: 0026-coredump-fix-coredump-when-cgroup-get-return-error.patch Patch0027: 0027-add-help-for-new-arguments.patch +Patch0028: 0028-seccomp-init-and-destroy-notifier.cookie.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -206,6 +207,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Fri Sep 17 2021 zhangxiaoyu - 4.0.3-2021091701 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:seccomp init and destroy notifier.cookie + * Thu Aug 26 2021 haozi007 - 4.0.3-2021082601 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 03ee73d..7d26b20 100644 --- a/series.conf +++ b/series.conf @@ -25,3 +25,4 @@ 0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch 0026-coredump-fix-coredump-when-cgroup-get-return-error.patch 0027-add-help-for-new-arguments.patch +0028-seccomp-init-and-destroy-notifier.cookie.patch -- Gitee