Version 249.7

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-14 11:38:53 +01:00
parent 27cc5e08c2
commit 87e1ce3317
3 changed files with 14 additions and 50 deletions

View File

@ -1,43 +0,0 @@
From d35551d8c6a9c46442500992abfb67774f9fa8d8 Mon Sep 17 00:00:00 2001
From: Jonas Witschel <diabonas@archlinux.org>
Date: Wed, 10 Nov 2021 22:46:35 +0100
Subject: [PATCH] scope: count successful cgroup additions when delegating via
D-Bus
Since commit 8d3e4ac7cd37200d1431411a4b98925a24b7d9b3 ("scope: refuse
activation of scopes if no PIDs to add are left") all "systemd-run --scope
--user" calls fail because cgroup attachments delegated to the system instance
are not counted towards successful additions. Fix this by incrementing the
return value in case unit_attach_pid_to_cgroup_via_bus() succeeds, similar to
what happens when cg_attach() succeeds directly.
Note that this can *not* distinguish the case when
unit_attach_pid_to_cgroup_via_bus() has been run successfully, but all
processes to attach are gone in the meantime, unlike the checks that commit
8d3e4ac7cd37200d1431411a4b98925a24b7d9b3 adds for the system instance. This is
because even though unit_attach_pid_to_cgroup_via_bus() leads to an internal
unit_attach_pids_to_cgroup() call, the return value over D-Bus does not include
the number of successfully attached processes and is always NULL on success.
Fixes: #21297
---
src/core/cgroup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index abc30e3990c4..c942db8d05eb 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -2283,8 +2283,11 @@ int unit_attach_pids_to_cgroup(Unit *u, Set *pids, const char *suffix_path) {
z = unit_attach_pid_to_cgroup_via_bus(u, pid, suffix_path);
if (z < 0)
log_unit_info_errno(u, z, "Couldn't move process "PID_FMT" to requested cgroup '%s' (directly or via the system bus): %m", pid, empty_to_root(p));
- else
+ else {
+ if (ret >= 0)
+ ret++; /* Count successful additions */
continue; /* When the bus thing worked via the bus we are fully done for this PID. */
+ }
}
if (ret >= 0)

View File

@ -1 +1 @@
SHA512 (systemd-249.6.tar.gz) = 7149cb807cac05a590545a9155ecacdf230f09cac70585fa8e7ddd1f03e86205cb1c91b51885b65d2f2cf921e6fdad5ca182047d290f31631c8eb362fe87e4a5 SHA512 (systemd-249.7.tar.gz) = 65848a1141f66f11610ab28f70ef2fa4539e2fc31b9f6c9d9a18d9d68be877ad02b5699d05d98b209eac4e28ba5141f83366c2b70f485f3f406d7bc14eb21365

View File

@ -30,8 +30,8 @@
Name: systemd Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd Url: https://www.freedesktop.org/wiki/Software/systemd
%if %{without inplace} %if %{without inplace}
Version: 249.6 Version: 249.7
Release: 4%{?dist} Release: 1%{?dist}
%else %else
# determine the build information from local checkout # determine the build information from local checkout
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/') Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
@ -99,7 +99,6 @@ Patch0005: 0005-update-helper-also-add-user-reexec-verb.patch
Patch0006: 0006-update-helper-add-missing-loop-over-user-units.patch Patch0006: 0006-update-helper-add-missing-loop-over-user-units.patch
Patch0007: https://github.com/systemd/systemd/commit/2da7d0bc92.patch Patch0007: https://github.com/systemd/systemd/commit/2da7d0bc92.patch
Patch0008: https://github.com/systemd/systemd/commit/d35551d8c6.patch
# Downstream-only patches (50009999) # Downstream-only patches (50009999)
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828 # https://bugzilla.redhat.com/show_bug.cgi?id=1738828
@ -1011,7 +1010,15 @@ fi
%files standalone-sysusers -f .file-list-standalone-sysusers %files standalone-sysusers -f .file-list-standalone-sysusers
%changelog %changelog
* Wed Nov 10 2021 Kir Kolyshkin <kolyshkin@gmail.com> - 249.6-4 * Sun Nov 14 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.7-1
- Latest bugfix release (better erofs detection, sd-event memory
corruption bugfix, logind, documentation)
- Really fix helper to restart user units with older systemd (#2020415)
* Sun Nov 14 2021 Petr Menšík <pemensik@redhat.com> - 249.7-1
- Switch /etc/resolv.conf over to NM when systemd-resolved is uninstalled
* Wed Nov 10 2021 Kir Kolyshkin <kolyshkin@gmail.com> - 249.7-1
- Fix scope activation from a user instance (#2022041) - Fix scope activation from a user instance (#2022041)
* Mon Nov 8 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.6-3 * Mon Nov 8 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.6-3
@ -1028,8 +1035,8 @@ fi
* Tue Oct 12 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.5-1 * Tue Oct 12 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.5-1
- Latest bugfix release (various fixes in systemd-networkd, - Latest bugfix release (various fixes in systemd-networkd,
--timesyncd, -journald, -udev, homed, -resolved, -repart, -oomd, -timesyncd, -journald, -udev, homed, -resolved, -repart, -oomd,
--coredump, systemd itself, seccomp filters, TPM2 handling, -coredump, systemd itself, seccomp filters, TPM2 handling,
-documentation, sd-event, sd-journal, journalctl, and nss-systemd). -documentation, sd-event, sd-journal, journalctl, and nss-systemd).
- Fixes #1976445. - Fixes #1976445.