From de4aeef83a21fb862efb3f94a0cb497b00449e71 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov <oleg@redhat.com> Date: Tue, 25 Aug 2009 00:43:37 +0200 Subject: [PATCH] Introduce the empty inline tracehook_finish_jctl() helper called by do_signal_stop() after wakeup. Currently we lack the ability to report this state change. Also fix the comment, it should be placed before schedule(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- include/linux/tracehook.h | 9 +++++++++ kernel/signal.c | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 7c2bfd99c3c..1eb44a924e5 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h @@ -488,6 +488,15 @@ static inline int tracehook_notify_jctl(int notify, int why) return notify ?: (current->ptrace & PT_PTRACED) ? why : 0; } +/** + * tracehook_finish_jctl - report about return from job control stop + * + * This is called by do_signal_stop() after wakeup. + */ +static inline void tracehook_finish_jctl(void) +{ +} + #define DEATH_REAP -1 #define DEATH_DELAYED_GROUP_LEADER -2 diff --git a/kernel/signal.c b/kernel/signal.c index b93c3e19ba9..6705320784f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1717,12 +1717,12 @@ static int do_signal_stop(int signr) read_unlock(&tasklist_lock); } + /* Now we don't run again until woken by SIGCONT or SIGKILL */ do { schedule(); } while (try_to_freeze()); - /* - * Now we don't run again until continued. - */ + + tracehook_finish_jctl(); current->exit_code = 0; return 1; -- 2.25.4