From: Michal Sekletar Date: Thu, 7 May 2020 15:23:30 +0000 (+0200) Subject: core/cgroup: fix return value of unit_cgorup_freezer_action() X-Git-Tag: v246-rc1~413 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d910f4c;p=thirdparty%2Fsystemd.git core/cgroup: fix return value of unit_cgorup_freezer_action() We should return 0 only if current freezer state, as reported by the kernel, is already the desired state. Otherwise, we would dispatch return dbus message prematurely in bus_unit_method_freezer_generic(). Thanks to Frantisek Sumsal for reporting the issue. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 56598d3baad..7d45438e85a 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -3634,7 +3634,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { if (r < 0) return r; - return 0; + return 1; } static const char* const cgroup_device_policy_table[_CGROUP_DEVICE_POLICY_MAX] = {