X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libust%2Flttng-ust-comm.c;h=c5a3064ae216f222771e7acd99199ea12a520085;hb=56cd7e2fe3fd32cb212d0e7976a6bae09ff4948c;hp=9400b6b8ff9f6fdb74e4461aa6d6e1cf464e0b59;hpb=c0eedf810db01116d90e57e6eda9b6a950e5c515;p=lttng-ust.git diff --git a/libust/lttng-ust-comm.c b/libust/lttng-ust-comm.c index 9400b6b8..c5a3064a 100644 --- a/libust/lttng-ust-comm.c +++ b/libust/lttng-ust-comm.c @@ -217,6 +217,9 @@ int handle_register_done(struct sock_info *sock_info) if (sock_info->constructor_sem_posted) return 0; sock_info->constructor_sem_posted = 1; + if (uatomic_read(&sem_count) <= 0) { + return 0; + } ret = uatomic_add_return(&sem_count, -1); if (ret == 0) { ret = sem_post(&constructor_wait);