]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
cgroup1: don't call release_agent when it is ""
authorTycho Andersen <tycho@tycho.ws>
Wed, 19 Feb 2020 19:01:29 +0000 (12:01 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 3 Apr 2020 13:17:23 +0000 (15:17 +0200)
commit8e3e9f993c8dc5a370b5280dca9eb93ed636f47a
treee018d30b7bc6e0b0ea2d602a240bf32e8807f31d
parent6badb6944abef43493bc70661a49bfb4ca75f563
cgroup1: don't call release_agent when it is ""

BugLink: https://bugs.launchpad.net/bugs/1870142
[ Upstream commit 2e5383d7904e60529136727e49629a82058a5607 ]

Older (and maybe current) versions of systemd set release_agent to "" when
shutting down, but do not set notify_on_release to 0.

Since 64e90a8acb85 ("Introduce STATIC_USERMODEHELPER to mediate
call_usermodehelper()"), we filter out such calls when the user mode helper
path is "". However, when used in conjunction with an actual (i.e. non "")
STATIC_USERMODEHELPER, the path is never "", so the real usermode helper
will be called with argv[0] == "".

Let's avoid this by not invoking the release_agent when it is "".

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
kernel/cgroup/cgroup-v1.c