]> Pileus Git - ~andy/linux/blobdiff - arch/s390/kernel/process.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
[~andy/linux] / arch / s390 / kernel / process.c
index bab088de45697b4772d26e76638554b5f688420a..cd31ad457a9bdb7890a0ff7eae840a63f5f0f48f 100644 (file)
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/vtimer.h>
+#include <asm/exec.h>
 #include <asm/irq.h>
 #include <asm/nmi.h>
 #include <asm/smp.h>
 #include <asm/switch_to.h>
+#include <asm/runtime_instr.h>
 #include "entry.h"
 
 asmlinkage void ret_from_fork(void) asm ("ret_from_fork");
@@ -103,6 +105,7 @@ extern void __kprobes kernel_thread_starter(void);
  */
 void exit_thread(void)
 {
+       exit_thread_runtime_instr();
 }
 
 void flush_thread(void)
@@ -165,6 +168,11 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
        frame->childregs.gprs[2] = 0;   /* child returns 0 on fork. */
        frame->childregs.gprs[15] = new_stackp;
 
+       /* Don't copy runtime instrumentation info */
+       p->thread.ri_cb = NULL;
+       p->thread.ri_signum = 0;
+       frame->childregs.psw.mask &= ~PSW_MASK_RI;
+
 #ifndef CONFIG_64BIT
        /*
         * save fprs to current->thread.fp_regs to merge them with