[patch-mm2] PI-futex: fix timeout race
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 12:17:28 +0200
The futex code has consequently the same timeout race as generic sleeper
based nanosleep. Call hrtimer_cancel() unconditionally.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Index: linux-2.6.16-mm2/kernel/rtmutex.c
===================================================================
--- linux-2.6.16-mm2.orig/kernel/rtmutex.c
+++ linux-2.6.16-mm2/kernel/rtmutex.c
@@ -789,7 +789,7 @@ rt_mutex_slowlock(struct rt_mutex *lock,
spin_unlock_irqrestore(&lock->wait_lock, flags);
/* Remove pending timer: */
- if (unlikely(timeout && timeout->task))
+ if (unlikely(timeout))
hrtimer_cancel(&timeout->timer);
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [patch 05/10] PI-futex: rt-mutex core
- From: Ingo Molnar
- Re: [patch 05/10] PI-futex: rt-mutex core
- From: Andrew Morton
- [patch] PI-futex: -V2
- From: Ingo Molnar
- [patch] PI-futex: -V3
- From: Ingo Molnar
- [patch 05/10] PI-futex: rt-mutex core
- Prev by Date: Re: [PATCH 2.6.15] Adding kernel-level identd dispatcher
- Next by Date: [Patch:004/004]Unify pxm_to_node id ver.3. (for i386)
- Previous by thread: [patch] PI-futex: -V3
- Next by thread: <alpha/poll.h> change
- Index(es):