|
@@ -125,6 +125,11 @@ void marker_probe_cb(const struct marker *mdata, void *call_private, ...)
|
|
} else {
|
|
} else {
|
|
struct marker_probe_closure *multi;
|
|
struct marker_probe_closure *multi;
|
|
int i;
|
|
int i;
|
|
|
|
+ /*
|
|
|
|
+ * Read mdata->ptype before mdata->multi.
|
|
|
|
+ */
|
|
|
|
+ smp_rmb();
|
|
|
|
+ multi = mdata->multi;
|
|
/*
|
|
/*
|
|
* multi points to an array, therefore accessing the array
|
|
* multi points to an array, therefore accessing the array
|
|
* depends on reading multi. However, even in this case,
|
|
* depends on reading multi. However, even in this case,
|
|
@@ -133,7 +138,6 @@ void marker_probe_cb(const struct marker *mdata, void *call_private, ...)
|
|
* in the fast path, so put the explicit barrier here.
|
|
* in the fast path, so put the explicit barrier here.
|
|
*/
|
|
*/
|
|
smp_read_barrier_depends();
|
|
smp_read_barrier_depends();
|
|
- multi = mdata->multi;
|
|
|
|
for (i = 0; multi[i].func; i++) {
|
|
for (i = 0; multi[i].func; i++) {
|
|
va_start(args, call_private);
|
|
va_start(args, call_private);
|
|
multi[i].func(multi[i].probe_private, call_private,
|
|
multi[i].func(multi[i].probe_private, call_private,
|
|
@@ -174,6 +178,11 @@ void marker_probe_cb_noarg(const struct marker *mdata, void *call_private, ...)
|
|
} else {
|
|
} else {
|
|
struct marker_probe_closure *multi;
|
|
struct marker_probe_closure *multi;
|
|
int i;
|
|
int i;
|
|
|
|
+ /*
|
|
|
|
+ * Read mdata->ptype before mdata->multi.
|
|
|
|
+ */
|
|
|
|
+ smp_rmb();
|
|
|
|
+ multi = mdata->multi;
|
|
/*
|
|
/*
|
|
* multi points to an array, therefore accessing the array
|
|
* multi points to an array, therefore accessing the array
|
|
* depends on reading multi. However, even in this case,
|
|
* depends on reading multi. However, even in this case,
|
|
@@ -182,7 +191,6 @@ void marker_probe_cb_noarg(const struct marker *mdata, void *call_private, ...)
|
|
* in the fast path, so put the explicit barrier here.
|
|
* in the fast path, so put the explicit barrier here.
|
|
*/
|
|
*/
|
|
smp_read_barrier_depends();
|
|
smp_read_barrier_depends();
|
|
- multi = mdata->multi;
|
|
|
|
for (i = 0; multi[i].func; i++)
|
|
for (i = 0; multi[i].func; i++)
|
|
multi[i].func(multi[i].probe_private, call_private,
|
|
multi[i].func(multi[i].probe_private, call_private,
|
|
mdata->format, &args);
|
|
mdata->format, &args);
|