Fix range of sem_count
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Aug 2011 01:16:23 +0000 (21:16 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Aug 2011 01:16:23 +0000 (21:16 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libust/lttng-ust-comm.c

index 9400b6b8ff9f6fdb74e4461aa6d6e1cf464e0b59..c5a3064ae216f222771e7acd99199ea12a520085 100644 (file)
@@ -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);
This page took 0.02393 seconds and 4 git commands to generate.