* [ltt-dev] [UST PATCH] Fix missing data pointer
@ 2010-09-30 18:52 David Goulet
2010-09-30 19:13 ` Mathieu Desnoyers
0 siblings, 1 reply; 2+ messages in thread
From: David Goulet @ 2010-09-30 18:52 UTC (permalink / raw)
This applies to tracepoint using a marker (trace_mark_tp)
At commit 9dec086e052cf7f583a3afaa3aab48a6de8d38ac,
the tracepoint_probe_register/unregister_noupdate function has been
changed with the addition of a void data pointer. In set_marker(),
the call to that function was not updated with this new parameter.
The effect was that on a second register_trace with an already
registered probe, the data ptr was corrupted with false data and
thus the probe checking failed to validate duplicates. So, the same
data was reproduced for a single trace call. Same behavior for
unregistering the marker, it was not found.
NOTE : For now, this pointer is NULL because we don't have at this
point tracing session.
Signed-off-by: David Goulet <david.goulet at polymtl.ca>
---
libust/marker.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libust/marker.c b/libust/marker.c
index 0c85cc3..cb8ffc1 100644
--- a/libust/marker.c
+++ b/libust/marker.c
@@ -594,11 +594,11 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
//ust// BUG_ON(!ret);
ret = tracepoint_probe_register_noupdate(
elem->tp_name,
- elem->tp_cb);
+ elem->tp_cb, NULL);
} else {
ret = tracepoint_probe_unregister_noupdate(
elem->tp_name,
- elem->tp_cb);
+ elem->tp_cb, NULL);
/*
* tracepoint_probe_update_all() must be called
* before the module containing tp_cb is unloaded.
@@ -630,7 +630,7 @@ static void disable_marker(struct marker *elem)
* checking has been done in the __trace_mark_tp() macro.
*/
ret = tracepoint_probe_unregister_noupdate(elem->tp_name,
- elem->tp_cb);
+ elem->tp_cb, NULL);
WARN_ON(ret);
/*
* tracepoint_probe_update_all() must be called
--
1.7.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ltt-dev] [UST PATCH] Fix missing data pointer
2010-09-30 18:52 [ltt-dev] [UST PATCH] Fix missing data pointer David Goulet
@ 2010-09-30 19:13 ` Mathieu Desnoyers
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2010-09-30 19:13 UTC (permalink / raw)
* David Goulet (david.goulet at polymtl.ca) wrote:
> This applies to tracepoint using a marker (trace_mark_tp)
>
> At commit 9dec086e052cf7f583a3afaa3aab48a6de8d38ac,
> the tracepoint_probe_register/unregister_noupdate function has been
> changed with the addition of a void data pointer. In set_marker(),
> the call to that function was not updated with this new parameter.
> The effect was that on a second register_trace with an already
> registered probe, the data ptr was corrupted with false data and
> thus the probe checking failed to validate duplicates. So, the same
> data was reproduced for a single trace call. Same behavior for
> unregistering the marker, it was not found.
>
> NOTE : For now, this pointer is NULL because we don't have at this
> point tracing session.
>
> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> libust/marker.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libust/marker.c b/libust/marker.c
> index 0c85cc3..cb8ffc1 100644
> --- a/libust/marker.c
> +++ b/libust/marker.c
> @@ -594,11 +594,11 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
> //ust// BUG_ON(!ret);
> ret = tracepoint_probe_register_noupdate(
> elem->tp_name,
> - elem->tp_cb);
> + elem->tp_cb, NULL);
> } else {
> ret = tracepoint_probe_unregister_noupdate(
> elem->tp_name,
> - elem->tp_cb);
> + elem->tp_cb, NULL);
> /*
> * tracepoint_probe_update_all() must be called
> * before the module containing tp_cb is unloaded.
> @@ -630,7 +630,7 @@ static void disable_marker(struct marker *elem)
> * checking has been done in the __trace_mark_tp() macro.
> */
> ret = tracepoint_probe_unregister_noupdate(elem->tp_name,
> - elem->tp_cb);
> + elem->tp_cb, NULL);
> WARN_ON(ret);
> /*
> * tracepoint_probe_update_all() must be called
> --
> 1.7.3
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-30 19:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30 18:52 [ltt-dev] [UST PATCH] Fix missing data pointer David Goulet
2010-09-30 19:13 ` Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox