From 79159b5b411d47d02fb7541b694f8c5ab977704c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:44 -0500 Subject: [PATCH] signals: Do not wakeup self commit c0445b35154b777c8b4340c5930a1b2924a7f86f in tip. Signals which are delivered by current to current can do without waking up current :) Signed-off-by: Thomas Gleixner Signed-off-by: Paul Gortmaker --- kernel/signal.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index dbd7fe0..5967e7c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -559,6 +559,9 @@ void signal_wake_up(struct task_struct *t, int resume) set_tsk_thread_flag(t, TIF_SIGPENDING); + if (unlikely(t == current)) + return; + /* * For SIGKILL, we want to wake it up in the stopped/traced/killable * case. We don't check t->state here because there is a race with it -- 1.7.0.4