Fix a zmalloc bug
[ust.git] / libust / tracepoint.c
index 16b4819b88e686f01a6f3ad08a6de3cecf783f0c..6fe9cd7569444a79895d0fe7133e8a27c8e1ed4c 100644 (file)
@@ -74,7 +74,7 @@ struct tp_probes {
 
 static inline void *allocate_probes(int count)
 {
-       struct tp_probes *p  = zmalloc(count * sizeof(void *)
+       struct tp_probes *p  = zmalloc(count * sizeof(struct probe)
                        + sizeof(struct tp_probes));
        return p == NULL ? NULL : p->probes;
 }
@@ -87,7 +87,7 @@ static inline void *allocate_probes(int count)
 static inline void release_probes(void *old)
 {
        if (old) {
-               struct tp_probes *tp_probes = container_of(old,
+               struct tp_probes *tp_probes = _ust_container_of(old,
                        struct tp_probes, probes[0]);
 //ust//                call_rcu_sched(&tp_probes->u.rcu, rcu_free_old_probes);
                synchronize_rcu();
@@ -427,7 +427,7 @@ static void tracepoint_add_old_probes(void *old)
 {
        need_update = 1;
        if (old) {
-               struct tp_probes *tp_probes = container_of(old,
+               struct tp_probes *tp_probes = _ust_container_of(old,
                        struct tp_probes, probes[0]);
                list_add(&tp_probes->u.list, &old_probes);
        }
This page took 0.024096 seconds and 4 git commands to generate.