Commit db023ea595015058270be6a62fe60a7b6b5c50d7

Authored by Oleg Nesterov
1 parent 1b08e90721

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 <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff

arch/x86/kernel/signal.c
... ... @@ -785,10 +785,8 @@
785 785 mce_notify_process();
786 786 #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */
787 787  
788   - if (thread_info_flags & _TIF_UPROBE) {
789   - clear_thread_flag(TIF_UPROBE);
  788 + if (thread_info_flags & _TIF_UPROBE)
790 789 uprobe_notify_resume(regs);
791   - }
792 790  
793 791 /* deal with pending signal delivery */
794 792 if (thread_info_flags & _TIF_SIGPENDING)
kernel/events/uprobes.c
... ... @@ -1558,6 +1558,8 @@
1558 1558 {
1559 1559 struct uprobe_task *utask;
1560 1560  
  1561 + clear_thread_flag(TIF_UPROBE);
  1562 +
1561 1563 utask = current->utask;
1562 1564 if (utask && utask->active_uprobe)
1563 1565 handle_singlestep(utask, regs);