diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-09-18 21:31:06 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-09-18 21:40:30 -0400 |
commit | 8faa1fc5f98ccb87beb2e71c0ce087278a950dde (patch) | |
tree | 5510a35d85c996aa3d01594970af07536252175a /runtime | |
parent | ba01c24c38c098ae93cf62b239f03e824b5f5600 (diff) | |
download | systemtap-steved-8faa1fc5f98ccb87beb2e71c0ce087278a950dde.tar.gz systemtap-steved-8faa1fc5f98ccb87beb2e71c0ce087278a950dde.tar.xz systemtap-steved-8faa1fc5f98ccb87beb2e71c0ce087278a950dde.zip |
PR10655 part 1: uprobes: track sdt semaphores properly
commit 6846cfc8 introduced an unintended side-effect where semaphore tracking
was identified with stap_uprobe_specs[] elements, which are normally static/const.
This kernel patch <http://article.gmane.org/gmane.linux.kernel/854187> catches
and panics on this. The cure is to move the variable over to the stap_uprobes[]
array.
* tapsets.cxx (uprobe emit_module_decls): Add sdt_sem_address to stap_uprobe{} struct,
to contain per-process relocated semaphore address.
(emit_module_decls,_init): Remove tsk field, restore constness of appropriate
locals. Activate uprobe semaphore right around uprobe activation time. Remove
semaphore clearing upon process exit, since by then it's gone.
(emit_module_exit): Use remembered relocated semaphore address to clean up.
Fix "-uprobe" DEBUG_UPROBES message.
* runtime.h: #include <linux/sched.h>.
* dtrace.in (*_semaphore): Make it an unsigned short - intended 16 bits on all
common architectures/multilibs.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/runtime.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index 7087d435..a95627ae 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -28,6 +28,7 @@ #include <linux/kallsyms.h> #include <linux/version.h> #include <linux/compat.h> +#include <linux/sched.h> #include <linux/mm.h> #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) |