]> git.baikalelectronics.ru Git - 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)
committerTejun Heo <tj@kernel.org>
Wed, 4 Mar 2020 16:53:33 +0000 (11:53 -0500)
commit9a6ae9767c227cf01925c22d2c60af53a8cee3c2
tree97142f1aa020ab593f1860a0f8521a243c98cdf6
parentcb69c4e1b5aa73c384b2f2f0550506a71e3efccf
cgroup1: don't call release_agent when it is ""

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

Since f6158a6c9fae ("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>
kernel/cgroup/cgroup-v1.c