Fix: print format type mismatch
[lttng-tools.git] / src / bin / lttng-sessiond / syscall.c
index eb81d67429a2d96ac6b062db40940988ad0dd58c..1fc68d2ca5d73319ebddb7f395106b2fc083ad57 100644 (file)
@@ -73,7 +73,7 @@ int syscall_init_table(void)
        }
 
        while (fscanf(fp,
-                               "syscall { index = %lu; \
+                               "syscall { index = %zu; \
                                name = %" XSTR(SYSCALL_NAME_LEN) "[^;]; \
                                bitness = %u; };\n",
                                &index, name, &bitness) == 3) {
@@ -405,11 +405,15 @@ ssize_t syscall_list_channel(struct ltt_kernel_channel *kchan,
                        events = new_events;
                }
 
+               rcu_read_lock();
                ksyscall = lookup_syscall(syscalls_ht, syscall_table[i].name);
                if (ksyscall) {
                        update_event_syscall_bitness(events, i, ksyscall->index);
+                       rcu_read_unlock();
                        continue;
                }
+               ksyscall = NULL;
+               rcu_read_unlock();
 
                ret = add_syscall_to_ht(syscalls_ht, i, count);
                if (ret < 0) {
@@ -429,7 +433,10 @@ ssize_t syscall_list_channel(struct ltt_kernel_channel *kchan,
        return count;
 
 error:
+       rcu_read_lock();
        destroy_syscall_ht(syscalls_ht);
+       rcu_read_unlock();
+
        free(events);
        return ret;
 }
This page took 0.024995 seconds and 4 git commands to generate.