Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116633
b: refs/heads/master
c: ca2db6c
h: refs/heads/master
i:
  116631: ddd3751
v: v3
  • Loading branch information
Mathieu Desnoyers authored and Ingo Molnar committed Oct 14, 2008
1 parent bde7d5a commit 0cc6f28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d74185ed27651ad8d920b37d7851306ad01f7d6f
refs/heads/master: ca2db6cf30d6a45798b7a760d0c4f7735b16799d
15 changes: 6 additions & 9 deletions trunk/kernel/tracepoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ static void tracepoint_entry_free_old(struct tracepoint_entry *entry, void *old)
entry->rcu_pending = 1;
/* write rcu_pending before calling the RCU callback */
smp_wmb();
#ifdef CONFIG_PREEMPT_RCU
synchronize_sched(); /* Until we have the call_rcu_sched() */
#endif
call_rcu(&entry->rcu, free_old_closure);
call_rcu_sched(&entry->rcu, free_old_closure);
}

static void debug_print_probes(struct tracepoint_entry *entry)
Expand Down Expand Up @@ -245,9 +242,9 @@ static int remove_tracepoint(const char *name)
if (e->refcount)
return -EBUSY;
hlist_del(&e->hlist);
/* Make sure the call_rcu has been executed */
/* Make sure the call_rcu_sched has been executed */
if (e->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
kfree(e);
return 0;
}
Expand Down Expand Up @@ -344,11 +341,11 @@ int tracepoint_probe_register(const char *name, void *probe)
}
}
/*
* If we detect that a call_rcu is pending for this tracepoint,
* If we detect that a call_rcu_sched is pending for this tracepoint,
* make sure it's executed now.
*/
if (entry->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
old = tracepoint_entry_add_probe(entry, probe);
if (IS_ERR(old)) {
ret = PTR_ERR(old);
Expand Down Expand Up @@ -387,7 +384,7 @@ int tracepoint_probe_unregister(const char *name, void *probe)
if (!entry)
goto end;
if (entry->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
old = tracepoint_entry_remove_probe(entry, probe);
mutex_unlock(&tracepoints_mutex);
tracepoint_update_probes(); /* may update entry */
Expand Down

0 comments on commit 0cc6f28

Please sign in to comment.