mirror of
https://github.com/systemd/systemd.git
synced 2026-11-07 22:07:14 +00:00
core/scope: don't assert when start is retried during cgroup chown
While a delegated scope waits for the async cgroup chown helper it sits in SCOPE_START_CHOWN (UNIT_ACTIVATING). unit_start() forwards to ->start() while activating, so scope_start() could be re-entered in that state and trip assert(s->state == SCOPE_DEAD), aborting PID 1. Treat SCOPE_START_CHOWN as already-starting instead. Follow-up for03860190fe(cherry picked from commit62c182f0d5) (cherry picked from commitce595a30c1)
This commit is contained in:
1 parent
248845e6c8
commit
2d4e258564
1 file changed
+4
@@ -441,6 +441,10 @@ static int scope_start(Unit *u) {
|
||||
if (IN_SET(s->state, SCOPE_STOP_SIGTERM, SCOPE_STOP_SIGKILL))
|
||||
return -EAGAIN;
|
||||
|
||||
/* Already starting up (waiting for the async cgroup chown helper)? Then there's nothing to do. */
|
||||
if (s->state == SCOPE_START_CHOWN)
|
||||
return 0;
|
||||
|
||||
assert(s->state == SCOPE_DEAD);
|
||||
|
||||
if (!u->transient && !MANAGER_IS_RELOADING(u->manager))
|
||||
|
||||
Reference in new issue
Block a user