Commit 28d170ab authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Benjamin Herrenschmidt

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: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarMichael Neuling <mikey@neuling.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent fcb41a20
...@@ -910,10 +910,6 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) ...@@ -910,10 +910,6 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
flush_altivec_to_thread(src); flush_altivec_to_thread(src);
flush_vsx_to_thread(src); flush_vsx_to_thread(src);
flush_spe_to_thread(src); flush_spe_to_thread(src);
#ifdef CONFIG_HAVE_HW_BREAKPOINT
flush_ptrace_hw_breakpoint(src);
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
*dst = *src; *dst = *src;
return 0; return 0;
} }
...@@ -984,6 +980,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -984,6 +980,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
p->thread.ksp_limit = (unsigned long)task_stack_page(p) + p->thread.ksp_limit = (unsigned long)task_stack_page(p) +
_ALIGN_UP(sizeof(struct thread_info), 16); _ALIGN_UP(sizeof(struct thread_info), 16);
#ifdef CONFIG_HAVE_HW_BREAKPOINT
p->thread.ptrace_bps[0] = NULL;
#endif
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_STD_MMU_64
if (mmu_has_feature(MMU_FTR_SLB)) { if (mmu_has_feature(MMU_FTR_SLB)) {
unsigned long sp_vsid; unsigned long sp_vsid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment