aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-04-21 02:47:59 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-04-23 02:05:06 -0400
commit28d170abad3d6dfbe7309c0097d7de8a51c6b779 (patch)
treeab18538e19ad14fca380a18631ab7417b3fdad4d /arch/powerpc/kernel/process.c
parentfcb41a2030abe0eb716ef0798035ef9562097f42 (diff)
ptrace/powerpc: Don't flush_ptrace_hw_breakpoint() on fork()
arch_dup_task_struct() does flush_ptrace_hw_breakpoint(src), this destroys the parent's breakpoints for no reason. We should clear child->thread.ptrace_bps[] copied by dup_task_struct() instead. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 59dd545fdde1..834805cf13cb 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -910,10 +910,6 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
910 flush_altivec_to_thread(src); 910 flush_altivec_to_thread(src);
911 flush_vsx_to_thread(src); 911 flush_vsx_to_thread(src);
912 flush_spe_to_thread(src); 912 flush_spe_to_thread(src);
913#ifdef CONFIG_HAVE_HW_BREAKPOINT
914 flush_ptrace_hw_breakpoint(src);
915#endif /* CONFIG_HAVE_HW_BREAKPOINT */
916
917 *dst = *src; 913 *dst = *src;
918 return 0; 914 return 0;
919} 915}
@@ -984,6 +980,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
984 p->thread.ksp_limit = (unsigned long)task_stack_page(p) + 980 p->thread.ksp_limit = (unsigned long)task_stack_page(p) +
985 _ALIGN_UP(sizeof(struct thread_info), 16); 981 _ALIGN_UP(sizeof(struct thread_info), 16);
986 982
983#ifdef CONFIG_HAVE_HW_BREAKPOINT
984 p->thread.ptrace_bps[0] = NULL;
985#endif
986
987#ifdef CONFIG_PPC_STD_MMU_64 987#ifdef CONFIG_PPC_STD_MMU_64
988 if (mmu_has_feature(MMU_FTR_SLB)) { 988 if (mmu_has_feature(MMU_FTR_SLB)) {
989 unsigned long sp_vsid; 989 unsigned long sp_vsid;