From fb10329303b55f4b7af98237e65d72c030df13b0 Mon Sep 17 00:00:00 2001 From: kenistoj Date: Fri, 25 Jan 2008 23:55:04 +0000 Subject: * 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 --- runtime/uprobes/uprobes.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/uprobes/uprobes.h') 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; -- cgit