[PATCH -mm] signals-clear-signal-tty-when-the-last-thread-exits.fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oleg Nesterov
Date: Wednesday, March 24, 2010 - 7:23 am

(fixup for signals-clear-signal-tty-when-the-last-thread-exits.patch)

I didn't get this warning, but the old gcc complains

	kernel/exit.c: In function 'release_task':
	kernel/exit.c:85: warning: 'tty' may be used uninitialized in this function

This clearly wrong, to the point it blames release_task() instead of
__exit_signal(). But let's make compiler happy anyway, hopefully this
is what it wants.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---

 kernel/exit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 34-rc1/kernel/exit.c~FIX_EXIT_SIGNAL_TTY_WARNING	2010-03-21 18:36:44.000000000 +0100
+++ 34-rc1/kernel/exit.c	2010-03-24 14:59:55.000000000 +0100
@@ -82,7 +82,7 @@ static void __exit_signal(struct task_st
 	struct signal_struct *sig = tsk->signal;
 	bool group_dead = thread_group_leader(tsk);
 	struct sighand_struct *sighand;
-	struct tty_struct *tty;
+	struct tty_struct *tty = NULL;	/* supress gcc warning */
 
 	BUG_ON(!sig);
 	BUG_ON(!atomic_read(&sig->count));

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm] signals-clear-signal-tty-when-the-last-thread- ..., Oleg Nesterov, (Wed Mar 24, 7:23 am)