X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fmarker.c;h=b5a9fe1d50d5ce1c480ca7ca1777e55e6deb485e;hb=040378c1b24ace3b8945318a8c24ef218200912c;hp=041c33e3e95cc96283faf10e44ddc01c169098a9;hpb=7529963cb9c5db6821f0a00fc8426ebed79fc2e0;p=linux-2.6-omap-h63xx.git diff --git a/kernel/marker.c b/kernel/marker.c index 041c33e3e95..b5a9fe1d50d 100644 --- a/kernel/marker.c +++ b/kernel/marker.c @@ -23,12 +23,13 @@ #include #include #include +#include extern struct marker __start___markers[]; extern struct marker __stop___markers[]; /* Set to 1 to enable marker debug output */ -const int marker_debug; +static const int marker_debug; /* * markers_mutex nests inside module_mutex. Markers mutex protects the builtin @@ -671,6 +672,9 @@ 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); end: mutex_unlock(&markers_mutex); @@ -714,6 +718,9 @@ 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); remove_marker(name); /* Ignore busy error message */ ret = 0; @@ -792,6 +799,9 @@ 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); remove_marker(entry->name); /* Ignore busy error message */ end: