Re: MM kernels 2.6.24-rc*-mm*, 2.6.24-mm1: gnome-terminal stuck in tty_poll

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Thursday, February 7, 2008 - 12:49 pm

On Wed, 2008-02-06 at 18:23 -0800, Andrew Morton wrote:

Bugger, I thought I had it nailed with:

---

commit 3588a085cd52ef080bf72df772378e1ba6bb292f
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date:   Fri Feb 1 17:45:13 2008 +0100

    hrtimer: fix hrtimer_init_sleeper() users
    
    this patch:
    
     commit 37bb6cb4097e29ffee970065b74499cbf10603a3
     Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
     Date:   Fri Jan 25 21:08:32 2008 +0100
    
         hrtimer: unlock hrtimer_wakeup
    
    Broke hrtimer_init_sleeper() users. It forgot to fix up the futex
    caller of this function to detect the failed queueing and messed up
    the do_nanosleep() caller in that it could leak a TASK_INTERRUPTIBLE
    state.
    
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/futex.c b/kernel/futex.c
index db9824d..0edd314 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1252,6 +1252,8 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
 			t.timer.expires = *abs_time;
 
 			hrtimer_start(&t.timer, t.timer.expires, HRTIMER_MODE_ABS);
+			if (!hrtimer_active(&t.timer))
+				t.task = NULL;
 
 			/*
 			 * the timer could have already expired, in which
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index bd5d6b5..1069998 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1315,6 +1315,8 @@ static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mod
 
 	} while (t->task && !signal_pending(current));
 
+	__set_current_state(TASK_RUNNING);
+
 	return t->task == NULL;
 }
 

---

But apparently that doesn't do the magic for gnome-terminal (as this
patch is already in the .24-mm1 kernel reported broken). Any way I can
'easily' reproduce this issue?



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

Messages in current thread:
Re: MM kernels 2.6.24-rc*-mm*, 2.6.24-mm1: gnome-terminal ..., Peter Zijlstra, (Thu Feb 7, 12:49 pm)