summaryrefslogtreecommitdiff
path: root/src/core/dbus.c
diff options
context:
space:
mode:
authorMattias Jernberg <mattiasj@axis.com>2019-07-11 18:13:46 +0200
committerLennart Poettering <lennart@poettering.net>2019-08-14 16:12:31 +0200
commita5a8776ae5e4244b7f5acb2a1bfbe6e0b4d8a870 (patch)
tree0ba218a90b86b7fb13ad1bb0e3741d7c5c361439 /src/core/dbus.c
parentf364a17dd165b398bd15470e93726bf6ca90be90 (diff)
downloadsystemd-a5a8776ae5e4244b7f5acb2a1bfbe6e0b4d8a870.tar.gz
core: Avoid race when starting dbus services
In high load scenarios it is possible for services to be started before the NameOwnerChanged signal is properly installed. Emulate a callback by also queuing a GetNameOwner when the match is installed. Fixes: #12956
Diffstat (limited to 'src/core/dbus.c')
-rw-r--r--src/core/dbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c
index a8ce9ac447..bbfad1be74 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -784,7 +784,7 @@ static int manager_dispatch_sync_bus_names(sd_event_source *es, void *userdata)
* changed, so synthesize a name owner changed signal. */
if (!streq_ptr(unique, s->bus_name_owner))
- UNIT_VTABLE(u)->bus_name_owner_change(u, name, s->bus_name_owner, unique);
+ UNIT_VTABLE(u)->bus_name_owner_change(u, s->bus_name_owner, unique);
} else {
/* So, the name we're watching is not on the bus.
* This either means it simply hasn't appeared yet,
@@ -793,7 +793,7 @@ static int manager_dispatch_sync_bus_names(sd_event_source *es, void *userdata)
* and synthesize a name loss signal in this case. */
if (s->bus_name_owner)
- UNIT_VTABLE(u)->bus_name_owner_change(u, name, s->bus_name_owner, NULL);
+ UNIT_VTABLE(u)->bus_name_owner_change(u, s->bus_name_owner, NULL);
}
}