Fix: procname context semantic
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index be64acd01d03e6b730cec0403a4edda21fbd90ac..31955bb56d82b94a94a0d99886244353036a8f0a 100644 (file)
@@ -294,7 +294,7 @@ int handle_message(struct sock_info *sock_info,
                        goto error;
                }
 
-               if (lum->u.filter.reloc_offset > lum->u.filter.data_size - 1) {
+               if (lum->u.filter.reloc_offset > lum->u.filter.data_size) {
                        ERR("Filter reloc offset %u is not within data\n",
                                lum->u.filter.reloc_offset);
                        ret = -EINVAL;
@@ -616,9 +616,9 @@ int get_wait_shm(struct sock_info *sock_info, size_t mmap_size)
                        ret = ftruncate(wait_shm_fd, mmap_size);
                        if (ret) {
                                PERROR("ftruncate");
-                               exit(EXIT_FAILURE);
+                               _exit(EXIT_FAILURE);
                        }
-                       exit(EXIT_SUCCESS);
+                       _exit(EXIT_SUCCESS);
                }
                /*
                 * For local shm, we need to have rw access to accept
@@ -630,13 +630,13 @@ int get_wait_shm(struct sock_info *sock_info, size_t mmap_size)
                 */
                if (!sock_info->global && errno != EACCES) {
                        ERR("Error opening shm %s", sock_info->wait_shm_path);
-                       exit(EXIT_FAILURE);
+                       _exit(EXIT_FAILURE);
                }
                /*
                 * The shm exists, but we cannot open it RW. Report
                 * success.
                 */
-               exit(EXIT_SUCCESS);
+               _exit(EXIT_SUCCESS);
        } else {
                return -1;
        }
@@ -952,6 +952,7 @@ void __attribute__((constructor)) lttng_ust_init(void)
        lttng_fixup_ringbuffer_tls();
        lttng_fixup_vtid_tls();
        lttng_fixup_nest_count_tls();
+       lttng_fixup_procname_tls();
 
        /*
         * We want precise control over the order in which we construct
This page took 0.023592 seconds and 4 git commands to generate.