Re: 2.6.18-rt6

From: Esben Nielsen
Date: Wed Oct 18 2006 - 17:09:43 EST




On Wed, 18 Oct 2006, Ingo Molnar wrote:


i've released the 2.6.18-rt6 tree, which can be downloaded from the
usual place:

http://redhat.com/~mingo/realtime-preempt/

this is a fixes-mostly release. Changes since -rt4:

- fix for module loading / symbol table crash (John Stultz)
- scheduler fix (Mike Galbraith)
- fix x86_64 NMI watchdog & preempt-rcu interaction
- fix time-warp false positives
- jiffies_to_timespec export fix (Steven Rostedt)
- ll_rw_block.c warning fix (Mike Galbraith)
- PPC updates (Daniel Walker)
- MIPS updates (Manish Lachwani)
- ARM oprofile fix (Kevin Hilman)
- traditional futexes queued via plists (Séstien Duguése)
- (various other smaller fixes)

I assume this goes under small fixes:

I see that
spin_lock(&pi_state->pi_mutex.wait_lock);
is added in futex.c:570 in wake_futex_pi().
I do but I see some missing unlocks at returns.

I have a totally untested (it compiles) patch below.

Esben

kernel/futex.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Index: linux-2.6.18-rt/kernel/futex.c
===================================================================
--- linux-2.6.18-rt.orig/kernel/futex.c
+++ linux-2.6.18-rt/kernel/futex.c
@@ -590,10 +590,14 @@ static int wake_futex_pi(u32 __user *uad
inc_preempt_count();
curval = futex_atomic_cmpxchg_inatomic(uaddr, uval, newval);
dec_preempt_count();
- if (curval == -EFAULT)
+ if (curval == -EFAULT) {
+ spin_unlock(&pi_state->pi_mutex.wait_lock);
return -EFAULT;
- if (curval != uval)
+ }
+ if (curval != uval) {
+ spin_unlock(&pi_state->pi_mutex.wait_lock);
return -EINVAL;
+ }
}

spin_lock_irq(&pi_state->owner->pi_lock);