Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106012
b: refs/heads/master
c: 28325df
h: refs/heads/master
v: v3
  • Loading branch information
Mathieu Desnoyers authored and Linus Torvalds committed Jul 25, 2008
1 parent 2fc41e1 commit 576dfdc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 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: 24879a8e3e68f146d4d85528cc0b5dea712b77c5
refs/heads/master: 28325df0d9339b7f3aba9c45174d4586223ef46b
25 changes: 8 additions & 17 deletions trunk/kernel/marker.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ static int remove_marker(const char *name)
hlist_del(&e->hlist);
/* Make sure the call_rcu has been executed */
if (e->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
kfree(e);
return 0;
}
Expand Down Expand Up @@ -476,7 +476,7 @@ static int marker_set_format(struct marker_entry **entry, const char *format)
hlist_del(&(*entry)->hlist);
/* Make sure the call_rcu has been executed */
if ((*entry)->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
kfree(*entry);
*entry = e;
trace_mark(core_marker_format, "name %s format %s",
Expand Down Expand Up @@ -655,7 +655,7 @@ int marker_probe_register(const char *name, const char *format,
* make sure it's executed now.
*/
if (entry->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
old = marker_entry_add_probe(entry, probe, probe_private);
if (IS_ERR(old)) {
ret = PTR_ERR(old);
Expand All @@ -670,10 +670,7 @@ int marker_probe_register(const char *name, const char *format,
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);
end:
mutex_unlock(&markers_mutex);
return ret;
Expand Down Expand Up @@ -704,7 +701,7 @@ int marker_probe_unregister(const char *name,
if (!entry)
goto end;
if (entry->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
old = marker_entry_remove_probe(entry, probe, probe_private);
mutex_unlock(&markers_mutex);
marker_update_probes(); /* may update entry */
Expand All @@ -716,10 +713,7 @@ int marker_probe_unregister(const char *name,
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);
remove_marker(name); /* Ignore busy error message */
ret = 0;
end:
Expand Down Expand Up @@ -786,7 +780,7 @@ int marker_probe_unregister_private_data(marker_probe_func *probe,
goto end;
}
if (entry->rcu_pending)
rcu_barrier();
rcu_barrier_sched();
old = marker_entry_remove_probe(entry, NULL, probe_private);
mutex_unlock(&markers_mutex);
marker_update_probes(); /* may update entry */
Expand All @@ -797,10 +791,7 @@ int marker_probe_unregister_private_data(marker_probe_func *probe,
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);
remove_marker(entry->name); /* Ignore busy error message */
end:
mutex_unlock(&markers_mutex);
Expand Down

0 comments on commit 576dfdc

Please sign in to comment.