diff options
| -rw-r--r-- | recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch b/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch index b1299f50..34f0c09e 100644 --- a/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch +++ b/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From f9c640fa1d4c14dfbd2bc40af91cb446ad373075 Mon Sep 17 00:00:00 2001 | 1 | From 12d92162c449d51f4ffa482f7daaeb42c4135937 Mon Sep 17 00:00:00 2001 |
| 2 | From: Jason Wessel <jason.wessel@windriver.com> | 2 | From: Jason Wessel <jason.wessel@windriver.com> |
| 3 | Date: Tue, 2 Jul 2019 20:51:08 +0000 | 3 | Date: Tue, 2 Jul 2019 20:51:08 +0000 |
| 4 | Subject: [PATCH] Add additional cgroup mounts from root NS automatically | 4 | Subject: [PATCH] Add additional cgroup mounts from root NS automatically |
| @@ -9,10 +9,10 @@ Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | |||
| 9 | 1 file changed, 45 insertions(+) | 9 | 1 file changed, 45 insertions(+) |
| 10 | 10 | ||
| 11 | diff --git a/src/systemdhook.c b/src/systemdhook.c | 11 | diff --git a/src/systemdhook.c b/src/systemdhook.c |
| 12 | index 87a3585..5220c54 100644 | 12 | index c2cb2b9..f9ec9f2 100644 |
| 13 | --- a/src/systemdhook.c | 13 | --- a/src/systemdhook.c |
| 14 | +++ b/src/systemdhook.c | 14 | +++ b/src/systemdhook.c |
| 15 | @@ -281,6 +281,11 @@ static char *get_process_cgroup_subsystem_path(const char *id, int pid, const ch | 15 | @@ -274,6 +274,11 @@ static char *get_process_cgroup_subsystem_path(const char *id, int pid, const ch |
| 16 | static int mount_cgroup(const char *id, const char *rootfs, const char *options, char *systemd_path) | 16 | static int mount_cgroup(const char *id, const char *rootfs, const char *options, char *systemd_path) |
| 17 | { | 17 | { |
| 18 | _cleanup_free_ char *cgroup_path = NULL; | 18 | _cleanup_free_ char *cgroup_path = NULL; |
| @@ -24,8 +24,8 @@ index 87a3585..5220c54 100644 | |||
| 24 | 24 | ||
| 25 | if (asprintf(&cgroup_path, "%s/%s", rootfs, CGROUP_ROOT) < 0) { | 25 | if (asprintf(&cgroup_path, "%s/%s", rootfs, CGROUP_ROOT) < 0) { |
| 26 | pr_perror("%s: Failed to create path for %s", id, CGROUP_ROOT); | 26 | pr_perror("%s: Failed to create path for %s", id, CGROUP_ROOT); |
| 27 | @@ -290,6 +295,46 @@ static int mount_cgroup(const char *id, const char *rootfs, const char *options, | 27 | @@ -292,6 +297,46 @@ static int mount_cgroup(const char *id, const char *rootfs, const char *options, |
| 28 | pr_perror("%s: Failed to mkdir new dest: %s", id, cgroup_path); | 28 | pr_perror("%s: Failed to mkdir new dest: %s", id, systemd_path); |
| 29 | return -1; | 29 | return -1; |
| 30 | } | 30 | } |
| 31 | + /* Create all additional cgroup mounts which are in the root namespace */ | 31 | + /* Create all additional cgroup mounts which are in the root namespace */ |
| @@ -68,9 +68,9 @@ index 87a3585..5220c54 100644 | |||
| 68 | + free(dpath); | 68 | + free(dpath); |
| 69 | + } | 69 | + } |
| 70 | + closedir(dir); | 70 | + closedir(dir); |
| 71 | /* Mount tmpfs at new cgroup directory */ | 71 | if (remount_readonly(id, cgroup_path, cgroup_path) < 0) { |
| 72 | if (mount("tmpfs", cgroup_path, "tmpfs", MS_NODEV|MS_NOSUID, options) == -1) { | 72 | return -1; |
| 73 | pr_perror("%s: Failed to mount tmpfs at %s", id, cgroup_path); | 73 | } |
| 74 | -- | 74 | -- |
| 75 | 2.19.1 | 75 | 2.7.4 |
| 76 | 76 | ||
