From 8faa1fc5f98ccb87beb2e71c0ce087278a950dde Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 18 Sep 2009 21:31:06 -0400 Subject: 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 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 . * dtrace.in (*_semaphore): Make it an unsigned short - intended 16 bits on all common architectures/multilibs. --- runtime/runtime.h | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/runtime.h') 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 #include #include +#include #include #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) -- cgit