aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/marker.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/marker.c')
-rw-r--r--kernel/marker.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/marker.c b/kernel/marker.c
index 9f76c4a622ec..fe5ca72f9659 100644
--- a/kernel/marker.c
+++ b/kernel/marker.c
@@ -100,11 +100,11 @@ void marker_probe_cb(const struct marker *mdata, void *call_private, ...)
100 char ptype; 100 char ptype;
101 101
102 /* 102 /*
103 * preempt_disable does two things : disabling preemption to make sure 103 * rcu_read_lock_sched does two things : disabling preemption to make
104 * the teardown of the callbacks can be done correctly when they are in 104 * sure the teardown of the callbacks can be done correctly when they
105 * modules and they insure RCU read coherency. 105 * are in modules and they insure RCU read coherency.
106 */ 106 */
107 preempt_disable(); 107 rcu_read_lock_sched();
108 ptype = mdata->ptype; 108 ptype = mdata->ptype;
109 if (likely(!ptype)) { 109 if (likely(!ptype)) {
110 marker_probe_func *func; 110 marker_probe_func *func;
@@ -142,7 +142,7 @@ void marker_probe_cb(const struct marker *mdata, void *call_private, ...)
142 va_end(args); 142 va_end(args);
143 } 143 }
144 } 144 }
145 preempt_enable(); 145 rcu_read_unlock_sched();
146} 146}
147EXPORT_SYMBOL_GPL(marker_probe_cb); 147EXPORT_SYMBOL_GPL(marker_probe_cb);
148 148
@@ -159,7 +159,7 @@ void marker_probe_cb_noarg(const struct marker *mdata, void *call_private, ...)
159 va_list args; /* not initialized */ 159 va_list args; /* not initialized */
160 char ptype; 160 char ptype;
161 161
162 preempt_disable(); 162 rcu_read_lock_sched();
163 ptype = mdata->ptype; 163 ptype = mdata->ptype;
164 if (likely(!ptype)) { 164 if (likely(!ptype)) {
165 marker_probe_func *func; 165 marker_probe_func *func;
@@ -192,7 +192,7 @@ void marker_probe_cb_noarg(const struct marker *mdata, void *call_private, ...)
192 multi[i].func(multi[i].probe_private, call_private, 192 multi[i].func(multi[i].probe_private, call_private,
193 mdata->format, &args); 193 mdata->format, &args);
194 } 194 }
195 preempt_enable(); 195 rcu_read_unlock_sched();
196} 196}
197EXPORT_SYMBOL_GPL(marker_probe_cb_noarg); 197EXPORT_SYMBOL_GPL(marker_probe_cb_noarg);
198 198
@@ -539,7 +539,7 @@ static int set_marker(struct marker_entry **entry, struct marker *elem,
539 * Disable a marker and its probe callback. 539 * Disable a marker and its probe callback.
540 * Note: only waiting an RCU period after setting elem->call to the empty 540 * Note: only waiting an RCU period after setting elem->call to the empty
541 * function insures that the original callback is not used anymore. This insured 541 * function insures that the original callback is not used anymore. This insured
542 * by preempt_disable around the call site. 542 * by rcu_read_lock_sched around the call site.
543 */ 543 */
544static void disable_marker(struct marker *elem) 544static void disable_marker(struct marker *elem)
545{ 545{