summaryrefslogtreecommitdiffstats
path: root/runtime/uprobes/uprobes.h
diff options
context:
space:
mode:
authorkenistoj <kenistoj>2008-01-25 23:55:04 +0000
committerkenistoj <kenistoj>2008-01-25 23:55:04 +0000
commitfb10329303b55f4b7af98237e65d72c030df13b0 (patch)
tree326cc0efa5719a742f95b7580b605fbc91273de0 /runtime/uprobes/uprobes.h
parent1939ea3217ce8b8fae35e4a70f4cd5c1c431e438 (diff)
downloadsystemtap-steved-fb10329303b55f4b7af98237e65d72c030df13b0.tar.gz
systemtap-steved-fb10329303b55f4b7af98237e65d72c030df13b0.tar.xz
systemtap-steved-fb10329303b55f4b7af98237e65d72c030df13b0.zip
* runtime/uprobes/uprobes.c: Within a probed process, serialize
calls to access_process_vm() when populating instructions slots. Fixes an SMP bug on multithreaded apps with many active probepoints. * runtime/uprobes/uprobes.h: Ditto
Diffstat (limited to 'runtime/uprobes/uprobes.h')
-rw-r--r--runtime/uprobes/uprobes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/uprobes/uprobes.h b/runtime/uprobes/uprobes.h
index e8a06599..418518f8 100644
--- a/runtime/uprobes/uprobes.h
+++ b/runtime/uprobes/uprobes.h
@@ -157,6 +157,13 @@ struct uprobe_ssol_area {
/* lock held while finding a free slot */
spinlock_t lock;
+ /*
+ * We currently use access_process_vm() to populate instruction
+ * slots. Calls must be serialized because access_process_vm()
+ * isn't thread-safe.
+ */
+ struct mutex populate_mutex;
+
/* Next slot to steal */
int next_slot;