]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/ia64/kernel/process.c
[ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc...
[karo-tx-linux.git] / arch / ia64 / kernel / process.c
index a9bfba46733db4ee0b7f9ea66b4c86c6523dc75a..e484910246ad7998d3818b1e6b13a7df91de23de 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/efi.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/kprobes.h>
 
 #include <asm/cpu.h>
 #include <asm/delay.h>
@@ -708,6 +709,13 @@ kernel_thread_helper (int (*fn)(void *), void *arg)
 void
 flush_thread (void)
 {
+       /*
+        * Remove function-return probe instances associated with this task
+        * and put them back on the free list. Do not insert an exit probe for
+        * this function, it will be disabled by kprobe_flush_task if you do.
+        */
+       kprobe_flush_task(current);
+
        /* drop floating-point and debug-register state if it exists: */
        current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
        ia64_drop_fpu(current);
@@ -722,6 +730,14 @@ flush_thread (void)
 void
 exit_thread (void)
 {
+
+       /*
+        * Remove function-return probe instances associated with this task
+        * and put them back on the free list. Do not insert an exit probe for
+        * this function, it will be disabled by kprobe_flush_task if you do.
+        */
+       kprobe_flush_task(current);
+
        ia64_drop_fpu(current);
 #ifdef CONFIG_PERFMON
        /* if needed, stop monitoring and flush state to perfmon context */