From: Oleg Nesterov Date: Fri, 14 Sep 2012 17:05:46 +0000 (+0200) Subject: uprobes: Move clear_thread_flag(TIF_UPROBE) to uprobe_notify_resume() X-Git-Tag: upstream/snapshot3+hdmi~6356^2~1^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db023ea595015058270be6a62fe60a7b6b5c50d7;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git uprobes: Move clear_thread_flag(TIF_UPROBE) to uprobe_notify_resume() Move clear_thread_flag(TIF_UPROBE) from do_notify_resume() to uprobe_notify_resume() for !CONFIG_UPROBES case. Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju --- diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index b280908..0041e5a 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -785,10 +785,8 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) mce_notify_process(); #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ - if (thread_info_flags & _TIF_UPROBE) { - clear_thread_flag(TIF_UPROBE); + if (thread_info_flags & _TIF_UPROBE) uprobe_notify_resume(regs); - } /* deal with pending signal delivery */ if (thread_info_flags & _TIF_SIGPENDING) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index d3f5381..198d732 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -1558,6 +1558,8 @@ void uprobe_notify_resume(struct pt_regs *regs) { struct uprobe_task *utask; + clear_thread_flag(TIF_UPROBE); + utask = current->utask; if (utask && utask->active_uprobe) handle_singlestep(utask, regs);