diff --git a/kernel/exit.c b/kernel/exit.c
index 6b2e4cf3e140e7eef27635fc4fb1b8f1f224c9fe..44d6c6e3896dd7b01b16225c97f8adb00b6438a8 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -112,6 +112,8 @@ static void __exit_signal(struct task_struct *tsk)
 		sig = NULL; /* Marker for below. */
 	}
 
+	__unhash_process(tsk);
+
 	tsk->signal = NULL;
 	cleanup_sighand(tsk);
 	spin_unlock(&sighand->siglock);
@@ -140,8 +142,6 @@ repeat:
 	BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children));
 	__exit_signal(p);
 
-	__unhash_process(p);
-
 	/*
 	 * If we are the last non-leader member of the thread
 	 * group, and the leader is zombie, then notify the